mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 15:14:56 -04:00
Support 'host' & 'path' config options
Signed-off-by: Miranda Kastemaa <miranda@foldplop.com>
This commit is contained in:
parent
23bd1a18bb
commit
70e8df5c04
4 changed files with 20 additions and 3 deletions
16
app.js
16
app.js
|
@ -205,11 +205,21 @@ io.sockets.on('connection', realtime.connection)
|
|||
|
||||
// listen
|
||||
function startListen () {
|
||||
server.listen(config.port, function () {
|
||||
var address
|
||||
var listenCallback = function () {
|
||||
var schema = config.useSSL ? 'HTTPS' : 'HTTP'
|
||||
logger.info('%s Server listening at port %d', schema, config.port)
|
||||
logger.info('%s Server listening at %s', schema, address)
|
||||
realtime.maintenance = false
|
||||
})
|
||||
}
|
||||
|
||||
// use unix domain socket if 'path' is specified
|
||||
if (config.path) {
|
||||
address = config.path
|
||||
server.listen(config.path, listenCallback)
|
||||
} else {
|
||||
address = config.host + ':' + config.port
|
||||
server.listen(config.port, config.host, listenCallback)
|
||||
}
|
||||
}
|
||||
|
||||
// sync db then start listen
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue