()
| 22 | } |
| 23 | |
| 24 | function startServer() { |
| 25 | // Create a web server to serve files and listen to WebSocket connections |
| 26 | var app = express(); |
| 27 | app.use(express.static('static')); |
| 28 | var server = http.createServer(app); |
| 29 | |
| 30 | // Connect any incoming WebSocket connection to ShareDB |
| 31 | var wss = new WebSocket.Server({server: server}); |
| 32 | wss.on('connection', function(ws) { |
| 33 | var stream = new WebSocketJSONStream(ws); |
| 34 | backend.listen(stream); |
| 35 | }); |
| 36 | |
| 37 | server.listen(8080); |
| 38 | console.log('Listening on http://localhost:8080'); |
| 39 | } |
nothing calls this directly
no outgoing calls
no test coverage detected