139837e997
* restructure realtime server for clarity * better indenting on signal.js * don't need it because socketioconnection is being imported now
18 lines
363 B
JavaScript
18 lines
363 B
JavaScript
var
|
|
io = require('socket.io')(),
|
|
signalling = require('./signal'),
|
|
junto = require('./junto'),
|
|
map = require('./map'),
|
|
global = require('./global'),
|
|
stunservers = [{"url": "stun:stun.l.google.com:19302"}]
|
|
|
|
var state = {
|
|
connectedPeople: {},
|
|
liveMaps: {}
|
|
}
|
|
signalling(io, stunservers, state)
|
|
junto(io, state)
|
|
map(io, state)
|
|
global(io, state)
|
|
io.listen(5001)
|
|
|