-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
26 lines (19 loc) · 694 Bytes
/
index.js
File metadata and controls
26 lines (19 loc) · 694 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const express = require('express');
const http = require('http');
const port = 12345;
/**
* Create static Express app for loading static content
*/
const app = express();
// Load a separate set of files for the performer - labeled "admin" here; TODO: logic to protect
app.use('/admin', express.static('static/performer'));
// Load the primary set of static files for the audience
app.use('/', express.static('static/audience'));
const server = http.createServer(app)
var WSServer = require("./server/ws-server.js").WSServer;
var PCServer = new WSServer("http://localhost:" + port, server);
server.listen(port);
server.on('listening', function ()
{
console.log("(re)started.");
});