Created
January 25, 2021 02:35
-
-
Save abachman/0a19290b609bd3b061f7913bebc96662 to your computer and use it in GitHub Desktop.
Signaling Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "house.chat server", | |
"main": "index.js", | |
"scripts": { | |
"start": "node index.js" | |
}, | |
"author": "Adam Bachman <[email protected]> (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