The same question is available on easyrtc forum https://easyrtc.com/forums/viewthread/167/
I was trying to implement the demo provided here : https://demo.easyrtc.com/demos/demo_audio_video_simple.html
Following steps as given in the below link https://easyrtc.com/docs/guides/easyrtc_server_install.php
—- Install Node.js curl -sL https://deb.nodesource.com/setup | sudo bash - sudo apt-get install -y nodejs —-
I am at logged in as root user root@pbx:/var/www/html# I did not get any erorr while running above commands
After running the above commands , I went to the second step ——- 2. Create folder hold the EasyRTC application
ex: sudo mkdir /var/nodes ex: sudo mkdir /var/nodes/easyrtc —- I created a folder /var/nodes/easyrtc as given in example
Should I create instead on /var/www/html (where my domain is pointed to) —- 3. Security Considerations (not going into specifics)
Create user for node.js (or use existing web user) chown the nodes folder to be owned by this user ensure the node is run as that user. —- Skipping above step since I am already logged in as root. Please point out how I could verify the three things mentioned above. ——— Download files from the server_example(https://github.com/priologic/easyrtc/tree/master/server_example) folder into your EasyRTC application folder.
OR download and extract this .zip
—- Does ‘EasyRTC application folder’ mentioned above indicate /var/nodes/easyrtc ?
https://github.com/priologic/easyrtc/tree/master/server_example
root@PBXRecptionist2:/var/nodes/easyrtc# ls easyrtc-master master.zip package.json README.md server.js static
After downloading the files I get the above in the easyrtc folder
— Change to the easyrtc folder and then install node modules locally
cd /var/nodes/easyrtc sudo npm install
—
following the other instructuion
It added node_modules folder with modules as given below
root@PBXRecptionist2:/var/nodes/easyrtc/node_modules# ls easyrtc express socket.io
—- Running EasyRTC Server
From Console Open your console on the server. In Windows you can use the provided Node.js console program located in the Start Menu. Navigate to your EasyRTC application folder Run the server using the node command. node server.js —
What does “Open your console on the server. ” mean?
I am logged in via ssh should I type command “node ” which opens a node console ??
Does “Navigate to your EasyRTC application folder” this mean moving to /var/nodes/easyrtc ?
When I do this “Run the server using the node command.” , node.js on /var/nodes/easyrtc
I get the following error root@PBXRecptionist2:/var/nodes/easyrtc# node server.js
module.js:340 throw err; ^ Error: Cannot find module ‘../’ at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/var/nodes/easyrtc/server.js:5:15) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10)
and if I do it root@PBXRecptionist2:/var/nodes/easyrtc# node
node server.js ...
I dont get anything
can anybody point where I am going wrong
Also I get an error that” Your HTML has not included the socket.io.js library” I am unsure how can I locate the socket.io.js library
My index.html for which I get the above error is ABCTELECOMMUNICATION: Simple Audio and Video Chat
[removed][removed]
[removed][removed] [removed][removed]
Not yet connected…
Connected users:
<div id=“otherClients”></div>
</div>
<div id=“videos”>
<video autoplay=“autoplay” class=“easyrtcMirror” id=“selfVideo” muted=“muted” volume=“0” ></video>
<div >
<video autoplay=“autoplay” id=“callerVideo”></video>
</div>
<!—each caller video needs to be in it"s own div so it"s close button can be positioned correctly—>
</div>
</div>
files in the same directory as on the index.html are drwxr-xr-x 7 root root 4.0K Mar 22 09:14 node_modules -rw-r—r—1 root root 603 Mar 22 09:08 server.js -rw-r—r—1 root root 1.2K Mar 22 08:49 index.html drwxr-xr-x 2 root root 4.0K Mar 22 08:44 easyrtc -rw-r—r—1 root root 1.2K Mar 21 15:23 index.html~ -rw-r—r—1 root root 170 Mar 20 12:02 socket.io.zip -rw-r—r—1 root root 1.4K Mar 17 09:50 server.crt -rw-r—r—1 root root 1.2K Mar 17 09:47 server.csr -rw-r—r—1 root root 1.7K Mar 17 09:31 server.key -rw-r—r—1 root root 1.8K Mar 17 09:30 server.key.secure drwxr-xr-x 2 root root 4.0K Feb 21 10:15 js drwxr-xr-x 2 root root 4.0K Feb 21 10:00 easyrtc-master -rw-r—r—1 root root 695K Feb 21 10:00 master.zip drwxr-xr-x 3 root root 4.0K Aug 24 2015 api drwxr-xr-x 5 root root 4.0K Aug 24 2015 demos drwxr-xr-x 3 root root 4.0K Aug 24 2015 dev drwxr-xr-x 4 root root 4.0K Aug 24 2015 docs -rw-r—r—1 root root 100 Aug 24 2015 index.js drwxr-xr-x 2 root root 4.0K Aug 24 2015 lib -rw-r—r—1 root root 1.4K Aug 24 2015 LICENSE -rw-r—r—1 root root 932 Aug 24 2015 package.json -rw-r—r—1 root root 5.7K Aug 24 2015 README.md drwxr-xr-x 3 root root 4.0K Aug 24 2015 server_example
Can someone help me debug and make the easyrtc work?