diff options
-rw-r--r-- | server.js | 4 | ||||
-rw-r--r-- | server/initializers/constants.js | 3 |
2 files changed, 4 insertions, 3 deletions
@@ -40,9 +40,6 @@ const mongoose = require('mongoose') | |||
40 | const routes = require('./server/controllers') | 40 | const routes = require('./server/controllers') |
41 | const Request = mongoose.model('Request') | 41 | const Request = mongoose.model('Request') |
42 | 42 | ||
43 | // Get configurations | ||
44 | const port = config.get('listen.port') | ||
45 | |||
46 | // ----------- Command line ----------- | 43 | // ----------- Command line ----------- |
47 | 44 | ||
48 | // ----------- App ----------- | 45 | // ----------- App ----------- |
@@ -129,6 +126,7 @@ app.use(function (err, req, res, next) { | |||
129 | res.sendStatus(err.status || 500) | 126 | res.sendStatus(err.status || 500) |
130 | }) | 127 | }) |
131 | 128 | ||
129 | const port = constants.CONFIG.LISTEN.PORT | ||
132 | installer.installApplication(function (err) { | 130 | installer.installApplication(function (err) { |
133 | if (err) throw err | 131 | if (err) throw err |
134 | 132 | ||
diff --git a/server/initializers/constants.js b/server/initializers/constants.js index 0efbbb916..d345776ff 100644 --- a/server/initializers/constants.js +++ b/server/initializers/constants.js | |||
@@ -31,6 +31,9 @@ const OAUTH_LIFETIME = { | |||
31 | // --------------------------------------------------------------------------- | 31 | // --------------------------------------------------------------------------- |
32 | 32 | ||
33 | const CONFIG = { | 33 | const CONFIG = { |
34 | LISTEN: { | ||
35 | PORT: config.get('listen.port') | ||
36 | }, | ||
34 | DATABASE: { | 37 | DATABASE: { |
35 | DBNAME: 'peertube' + config.get('database.suffix'), | 38 | DBNAME: 'peertube' + config.get('database.suffix'), |
36 | HOSTNAME: config.get('database.hostname'), | 39 | HOSTNAME: config.get('database.hostname'), |