Low Latency Voice Call server with nodejs and webrtc
If you simply want to view the final product website, I'll have it running from time to time on: https://12d93698.nip.io/broadcaster/index.html
This tutorial will help you in your journey to try to run this project locally. If you want to run this project on an AWS server like I did, godspeed.
Clone the project, I would suggest Visual Studio Code.
- Install the Github Pull Request extension if you haven't already
- In a new window, under start, you should have an option to
Clone Git Repository - Copy the HTTPS link under "< > Code"
- DO NOT COPY THE LINK IN THE BROWSER BAR
- Paste it in the popup
- Follow the directions VSCode gives you
- Install NodeJS if you haven't already. I think it's also a VSCode extension.
- In a terminal, try running
node index.jsinside the project folder
- If it fails outright, you either installed NodeJS improperly or aren't in the correct folder
- When it gives you a big error, try to see what you need to install. It might be a few tries before you npm install everything.
In order to run HTTPS, you need a couple .pem certificates.
You can use whatever you want for this step, but I would suggest using openssl.
The command that worked for me was: ./openssl genrsa -out localhost:8443 1024 -config openssl.cnf
npm install dotenv if you haven't already
To run the project with security, I used .gitignore on a folder named local.
This folder is in the main project folder and has a few files in it:
- .env
- cert.pem
- key.pem
.env contents:
PEMpassphrase=##########
PORT=8443
PRIVATE_KEY_PATH=./local/key.pem
CERTIFICATE_PATH=./local/cert.pemFinally, you might be able to run this project locally using node index.js.
If you have any issues, you can contact my consultant here