listen:
+ hostname: '127.0.0.1'
port: 9000
webserver:
listen:
+ hostname: 'localhost'
port: 9000
# Correspond to your reverse proxy "listen" configuration
async function startApplication () {
const port = CONFIG.LISTEN.PORT
+ const hostname = CONFIG.LISTEN.HOSTNAME
await installApplication()
Redis.Instance.init()
// Make server listening
- server.listen(port)
- logger.info('Server listening on port %d', port)
+ server.listen(port, hostname)
+ logger.info('Server listening on %s:%d', hostname, port)
logger.info('Web server: %s', CONFIG.WEBSERVER.URL)
}
// Check the config files
function checkMissedConfig () {
- const required = [ 'listen.port',
+ const required = [ 'listen.port', 'listen.hostname',
'webserver.https', 'webserver.hostname', 'webserver.port',
'trust_proxy',
'database.hostname', 'database.port', 'database.suffix', 'database.username', 'database.password',
const CONFIG = {
CUSTOM_FILE: getLocalConfigFilePath(),
LISTEN: {
- PORT: config.get<number>('listen.port')
+ PORT: config.get<number>('listen.port'),
+ HOSTNAME: config.get<string>('listen.hostname')
},
DATABASE: {
DBNAME: 'peertube' + config.get<string>('database.suffix'),
listen:
+ hostname: '127.0.0.1'
port: 9000
# Correspond to your reverse proxy "listen" configuration