I am trying to deploy a zoom clone app,a video chatting app. It works fine locally and as i have peer installed globally. I saved it as a dependency so heroku could install it as well but i still keep getting an application error when its deployed.
const myPeer = new Peer(undefined, {
secure: true,
host: 'myappname@herokuapp.com',
port: '443'
})
My package.json file
{
"name": "zoom_clone",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"start": "nodemon app.js"
},
"author": "preshy jones",
"license": "ISC",
"dependencies": {
"ejs": "^3.1.3",
"express": "^4.17.1",
"nodemon": "^2.0.4",
"peer": "^0.5.3",
"socket.io": "^2.3.0",
"uuid": "^8.3.0"
},
"devDependencies": {}
}
I still keep getting an application error.
You have to deploy peer-js serve on heroku and use that url as a host in your app. you can get information about deploying peerjs on heroku from here https://elements.heroku.com/buttons/peers/peerjs-server
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.