aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2015-12-14 21:09:25 +0100
committerChocobozzz <florian.bigard@gmail.com>2015-12-14 22:13:03 +0100
commit656ea8f70e848b03c0b668584dd533d72b376498 (patch)
treefa49512e3a3702a80d027838e5ab7486baca185a /server.js
parent1d7974c758d363a0037c2a7ed05a0848d3c027a4 (diff)
downloadPeerTube-656ea8f70e848b03c0b668584dd533d72b376498.tar.gz
PeerTube-656ea8f70e848b03c0b668584dd533d72b376498.tar.zst
PeerTube-656ea8f70e848b03c0b668584dd533d72b376498.zip
Create a constants module to easily modify some constants in a test
instance for example.
Diffstat (limited to 'server.js')
-rw-r--r--server.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/server.js b/server.js
index 4b93a7adf..ad57649b2 100644
--- a/server.js
+++ b/server.js
@@ -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