overleaf/services/chat/app.coffee

14 lines
414 B
CoffeeScript
Raw Normal View History

2014-08-15 05:50:36 -04:00
logger = require 'logger-sharelatex'
2014-08-15 06:35:22 -04:00
settings = require 'settings-sharelatex'
2014-08-15 05:50:36 -04:00
Server = require "./app/js/server"
2014-08-15 06:35:22 -04:00
if !module.parent # Called directly
port = settings.internal?.chat?.port or 3010
host = settings.internal?.chat?.host or "localhost"
Server.server.listen port, host, (error) ->
throw error if error?
logger.info "Chat starting up, listening on #{host}:#{port}"
2014-08-15 06:35:22 -04:00
module.exports = Server.server