From d961b7a75bf3f0d25339214e1a9535533a25fd36 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Tue, 5 Mar 2019 13:57:17 +0100 Subject: Refactored code structure --- server.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 server.js (limited to 'server.js') diff --git a/server.js b/server.js new file mode 100644 index 0000000..61eb331 --- /dev/null +++ b/server.js @@ -0,0 +1,20 @@ +/* + * 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}`)); -- cgit v1.2.3