Add ability to specify interface

This commit is contained in:
watercrossing 2014-09-02 10:41:48 +01:00
parent 62f207c368
commit c30bcfce53

View file

@ -35,7 +35,8 @@ if Settings.catchErrors
BackgroundTasks.run() BackgroundTasks.run()
port = Settings.port or Settings.internal?.web?.port or 3000 port = Settings.port or Settings.internal?.web?.port or 3000
Server.server.listen port, -> localInterface = Settings.interface or "0.0.0.0"
Server.server.listen port, localInterface, ->
logger.info("web-sharelatex listening on port #{port}") logger.info("web-sharelatex listening on port #{port}")
logger.info("#{require('http').globalAgent.maxSockets} sockets enabled") logger.info("#{require('http').globalAgent.maxSockets} sockets enabled")
if argv.user if argv.user