diff options
-rw-r--r-- | src/server.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/server.js b/src/server.js new file mode 100644 index 0000000..d3c0760 --- /dev/null +++ b/src/server.js @@ -0,0 +1,18 @@ +/* + * server.js + * Copyright (c) 2019, Texx + * License: MIT + * See https://github.com/texxme/Texx/blob/master/LICENSE + */ + +/** + * This script should only be used on a deployment server. For debugging purposes please use 'npm run dev' + */ +const PeerServer = require('peer').PeerServer; +const server = PeerServer({ + debug: true, + port: 4242, + path: '/api', +}); + +server.on('connection', id => console.log('New connection: ' + id)); |