mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-05-13 01:19:55 +02:00
Merge dc3c978f8d
into 9f834a5345
This commit is contained in:
commit
7619d67741
@ -395,10 +395,19 @@ class Server {
|
||||
})
|
||||
router.get('/healthcheck', (req, res) => res.sendStatus(200))
|
||||
|
||||
this.server.listen(this.Port, this.Host, () => {
|
||||
if (this.Host) Logger.info(`Listening on http://${this.Host}:${this.Port}`)
|
||||
else Logger.info(`Listening on port :${this.Port}`)
|
||||
})
|
||||
const unixSocketPrefix = "unix/"
|
||||
if(this.Host.startsWith(unixSocketPrefix)) {
|
||||
const sockPath = this.Host.slice(unixSocketPrefix.length)
|
||||
this.server.listen(sockPath, () => {
|
||||
fs.chmodSync(sockPath, 0o666)
|
||||
Logger.info(`Listening on unix socket ${sockPath}`)
|
||||
})
|
||||
} else {
|
||||
this.server.listen(this.Port, this.Host, () => {
|
||||
if (this.Host) Logger.info(`Listening on http://${this.Host}:${this.Port}`)
|
||||
else Logger.info(`Listening on port :${this.Port}`)
|
||||
})
|
||||
}
|
||||
|
||||
// Start listening for socket connections
|
||||
SocketAuthority.initialize(this)
|
||||
|
Loading…
Reference in New Issue
Block a user