aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/server.js
blob: d3c0760916c1dc52ac457f26ccefbb83b29de026 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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));