MCPcopy Create free account
hub / github.com/FernhillFable/cluster / startServer

Function startServer

examples/rich-text/server.js:26–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24}
25
26function startServer() {
27 // Create a web server to serve files and listen to WebSocket connections
28 var app = express();
29 app.use(express.static('static'));
30 app.use(express.static('node_modules/quill/dist'));
31 var server = http.createServer(app);
32
33 // Connect any incoming WebSocket connection to ShareDB
34 var wss = new WebSocket.Server({server: server});
35 wss.on('connection', function(ws) {
36 var stream = new WebSocketJSONStream(ws);
37 backend.listen(stream);
38 });
39
40 server.listen(8080);
41 console.log('Listening on http://localhost:8080');
42}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected