import http from './http.js'
import websocket from './websocket.js'
import config from './config.js'

export default () => {
  const sessions = {}

  const server = http(sessions)
  websocket(server, sessions)

  server.listen(config.port)

  return { sessions, server }
}
