diff options
author | Pierre-Alain TORET <pierre-alain.toret@protonmail.com> | 2018-04-17 11:14:32 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-04-17 11:14:32 +0200 |
commit | cff8b272b1631661b8d5f5f4b59bd534ad8c86ca (patch) | |
tree | 465cb9a49289e3695d60917f02974afd16799b27 /server.ts | |
parent | c0c7416a233d1bf1ed197b8f383aca74bc27c3f0 (diff) | |
download | PeerTube-cff8b272b1631661b8d5f5f4b59bd534ad8c86ca.tar.gz PeerTube-cff8b272b1631661b8d5f5f4b59bd534ad8c86ca.tar.zst PeerTube-cff8b272b1631661b8d5f5f4b59bd534ad8c86ca.zip |
Support hostname binding in config
* Add basic support for hostname binding
Signed-off-by: Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
* Make production example a bit more secure
Signed-off-by: Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
* Make example config files compatible with hostname binding modification
Signed-off-by: Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
* Fix typo
Signed-off-by: Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
* Bind on 127.0.0.1 by default
Signed-off-by: Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
* Update Docker configuration with hostname binding
Signed-off-by: Pierre-Alain TORET <pierre-alain.toret@protonmail.com>
Diffstat (limited to 'server.ts')
-rw-r--r-- | server.ts | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -194,6 +194,7 @@ app.use(function (err, req, res, next) { | |||
194 | 194 | ||
195 | async function startApplication () { | 195 | async function startApplication () { |
196 | const port = CONFIG.LISTEN.PORT | 196 | const port = CONFIG.LISTEN.PORT |
197 | const hostname = CONFIG.LISTEN.HOSTNAME | ||
197 | 198 | ||
198 | await installApplication() | 199 | await installApplication() |
199 | 200 | ||
@@ -214,7 +215,7 @@ async function startApplication () { | |||
214 | Redis.Instance.init() | 215 | Redis.Instance.init() |
215 | 216 | ||
216 | // Make server listening | 217 | // Make server listening |
217 | server.listen(port) | 218 | server.listen(port, hostname) |
218 | logger.info('Server listening on port %d', port) | 219 | logger.info('Server listening on %s:%d', hostname, port) |
219 | logger.info('Web server: %s', CONFIG.WEBSERVER.URL) | 220 | logger.info('Web server: %s', CONFIG.WEBSERVER.URL) |
220 | } | 221 | } |