This project is a peerjs-server ready for extensions
Go inside the project and install the dependencies
cd nodejs-typescript-skeleton
npm install -g yarn
yarn add express
And also the type definitions for the express module
yarn add -D @types/express
Start the server on port 3000 using:
yarn dev
Go ahead and hit the following URL http://localhost:3000/
and you should be greeted with the following response:
{ "message": "Hello World!" }
Get information from the server using the following: http://localhost:3000/signal/
You can generate a new random id using the following: http://localhost:3000/signal/peerjs/id
<script> const peer = new Peer('someid', { host: 'localhost', port: 3000, path: '/signal' }); </script>