mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Create a constants module to easily modify some constants in a test
instance for example.
This commit is contained in:
parent
1d7974c758
commit
656ea8f70e
7 changed files with 58 additions and 34 deletions
10
server.js
10
server.js
|
@ -26,18 +26,14 @@
|
|||
|
||||
checker.createDirectoriesIfNotExist()
|
||||
|
||||
// ----------- Constants -----------
|
||||
var utils = require('./src/utils')
|
||||
|
||||
global.API_VERSION = 'v1'
|
||||
global.FRIEND_BASE_SCORE = utils.isTestInstance() ? 20 : 100
|
||||
|
||||
// ----------- PeerTube modules -----------
|
||||
var config = require('config')
|
||||
var constants = require('./src/constants')
|
||||
var customValidators = require('./src/customValidators')
|
||||
var logger = require('./src/logger')
|
||||
var poolRequests = require('./src/poolRequests')
|
||||
var routes = require('./routes')
|
||||
var utils = require('./src/utils')
|
||||
var videos = require('./src/videos')
|
||||
var webtorrent = require('./src/webTorrentNode')
|
||||
|
||||
|
@ -76,7 +72,7 @@
|
|||
app.set('view engine', 'jade')
|
||||
|
||||
// API routes
|
||||
var api_route = '/api/' + global.API_VERSION
|
||||
var api_route = '/api/' + constants.API_VERSION
|
||||
app.use(api_route, routes.api)
|
||||
|
||||
// Views routes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue