Skip to content

Instantly share code, notes, and snippets.

@abachman
Created January 25, 2021 02:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abachman/0a19290b609bd3b061f7913bebc96662 to your computer and use it in GitHub Desktop.
Save abachman/0a19290b609bd3b061f7913bebc96662 to your computer and use it in GitHub Desktop.
Signaling Server
// npm install; npm start
const http = require('http'),
faye = require('faye');
const server = http.createServer(),
bayeux = new faye.NodeAdapter({mount: '/signal', timeout: 45});
bayeux.attach(server);
server.listen(8080);
{
"name": "house.chat server",
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"author": "Adam Bachman <adam.bachman@gmail.com> (https://github.com/abachman)",
"license": "MIT",
"dependencies": {
"faye": "^1.4.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment