diff options
Diffstat (limited to 'server.js')
-rw-r--r-- | server.js | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -26,18 +26,14 @@ | |||
26 | 26 | ||
27 | checker.createDirectoriesIfNotExist() | 27 | checker.createDirectoriesIfNotExist() |
28 | 28 | ||
29 | // ----------- Constants ----------- | ||
30 | var utils = require('./src/utils') | ||
31 | |||
32 | global.API_VERSION = 'v1' | ||
33 | global.FRIEND_BASE_SCORE = utils.isTestInstance() ? 20 : 100 | ||
34 | |||
35 | // ----------- PeerTube modules ----------- | 29 | // ----------- PeerTube modules ----------- |
36 | var config = require('config') | 30 | var config = require('config') |
31 | var constants = require('./src/constants') | ||
37 | var customValidators = require('./src/customValidators') | 32 | var customValidators = require('./src/customValidators') |
38 | var logger = require('./src/logger') | 33 | var logger = require('./src/logger') |
39 | var poolRequests = require('./src/poolRequests') | 34 | var poolRequests = require('./src/poolRequests') |
40 | var routes = require('./routes') | 35 | var routes = require('./routes') |
36 | var utils = require('./src/utils') | ||
41 | var videos = require('./src/videos') | 37 | var videos = require('./src/videos') |
42 | var webtorrent = require('./src/webTorrentNode') | 38 | var webtorrent = require('./src/webTorrentNode') |
43 | 39 | ||
@@ -76,7 +72,7 @@ | |||
76 | app.set('view engine', 'jade') | 72 | app.set('view engine', 'jade') |
77 | 73 | ||
78 | // API routes | 74 | // API routes |
79 | var api_route = '/api/' + global.API_VERSION | 75 | var api_route = '/api/' + constants.API_VERSION |
80 | app.use(api_route, routes.api) | 76 | app.use(api_route, routes.api) |
81 | 77 | ||
82 | // Views routes | 78 | // Views routes |