metamaps--metamaps/realtime/realtime-server.js
2016-11-09 20:44:00 -05:00

18 lines
492 B
JavaScript

const io = require('socket.io')()
const signalling = require('./signal')
const junto = require('./junto')
const map = require('./map')
const global = require('./global')
const stunservers = [{'url': 'stun:stun.l.google.com:19302'}]
const { createStore } = require('redux')
const reducer = require('./reducer')
let store = createStore(reducer)
global(io, store)
signalling(io, stunservers, store)
junto(io, store)
map(io, store)
io.listen(parseInt(process.env.NODE_REALTIME_PORT) || 5000)