CleverProgrammers / nodejs-zoom-clone

847 stars 484 forks source link

How can I run it on a local server? #9

Open gentil-eilison opened 4 years ago

gentil-eilison commented 4 years ago

What do I need to do in order to run it locally on my machine? Also, what is needed for me to be able to connect to it using another device? I tried running the server and typing my IP address:3030, but there was still just one video frame on the screen. I'd be grateful if someone could help me.

DawonChoi commented 4 years ago

I stuck in the same problem

auisdhf878tyc807asdhfiunkm commented 4 years ago

if you change line 6 in public/script.js to: port: '3030' then it should work on localhost:3030

Pratik-Hub commented 4 years ago

Guys We can't run this in localhost. As I tried it is not connecting other peer that is a person connect with us. So maybe host it in Heroku which is the best solution and then it worked for me......

Good Luck!!!! 🥇

Starbors commented 3 years ago

You dont Run on a local server its: 1.Download the file 2,install react 3.npm i or npm install 4.nodemon server.js 5.Visit localhost 3030 (Following me and supporting me can help me a lot!)

nlukic97 commented 3 years ago

But didn't they view the fully functioning project (two browsers seeing each others video) using a node server without any react ?

Video timestamp: https://youtu.be/ZVznzY7EjuY?t=6038

I deployed it to heroku, and it works (on desktops and laptops, not mobile phones). What setting did they have that allowed them to view this in nodemon ?

abhilasha007 commented 3 years ago

Guys We can't run this in localhost. As I tried it is not connecting other peer that is a person connect with us. So maybe host it in Heroku which is the best solution and then it worked for me......

Good Luck!!!! 🥇

Yes you're right.. but why is it not working in localhost

shivamjee-50 commented 3 years ago

In the script.js file, -> replace the socket.on function with this

socket.on('user-connected', userId => { setTimeout(() => { connectToNewUser(userId, stream) }, 1000) })