Hi I have installed this JS script on my website at slingyo.com.
However, it is not working at all, Node JS has been installed at server by tech support.
I am very beginner and struggling for make this JS program to up & running at my cloud web address slingyo.com
Please help me out
Make sure you have node v 10.0 or higher installed.
Allow connections to port 443 and 3001 (if you are running peerjs as in video) or just init myPeer as:
myPeer = new Peer(undefined, {}) // no options - will use peer cloud
Generate a self-signed certificate, run the following in your shell:
openssl genrsa -out server-key.pem
openssl req -new -key server-key.pem -out csr.pem
openssl x509 -req -days 9999 -in csr.pem -signkey -server-key.pem -out server-cert.pem
rm csr.pem
Now copy server.key.pem and server-cert.pem to root of the project add the following code to server.js:
const fs = require('fs')
const https = require('https')
const options = {
key:fs.readFileSync('server-key.pem'),
cert: fs.readFileSync('server-cert.pem')
}
const httpsServer = https.createServer(options, app)
Replace const io = require('socket.io')(server) with const io = require('socket.io')(httpServer)
Listen on 443: replace server.listen(80) with httpsServer.listen(443)
Run node server.js
Make sure firewall is turned off. Now connect to the instance in the browser of your choice.
Hi I had have the same need and problem as @paully1004 had have.
Thanks to @ashishlijhara, I figured it out and created a README.md
Please check out the forked repository.
Hi I have installed this JS script on my website at slingyo.com. However, it is not working at all, Node JS has been installed at server by tech support. I am very beginner and struggling for make this JS program to up & running at my cloud web address slingyo.com Please help me out