aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.js
diff options
context:
space:
mode:
Diffstat (limited to 'server.js')
-rw-r--r--server.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/server.js b/server.js
index 1e0222f4f..1153c9ef6 100644
--- a/server.js
+++ b/server.js
@@ -30,16 +30,20 @@
30 var config = require('config') 30 var config = require('config')
31 var constants = require('./initializers/constants') 31 var constants = require('./initializers/constants')
32 var customValidators = require('./helpers/customValidators') 32 var customValidators = require('./helpers/customValidators')
33 var database = require('./initializers/database')
33 var logger = require('./helpers/logger') 34 var logger = require('./helpers/logger')
34 var poolRequests = require('./lib/poolRequests') 35 var poolRequests = require('./lib/poolRequests')
35 var routes = require('./controllers') 36 var routes = require('./controllers')
36 var utils = require('./helpers/utils') 37 var utils = require('./helpers/utils')
37 var videos = require('./models/videos') 38 var videos = require('./lib/videos')
38 var webtorrent = require('./lib/webTorrentNode') 39 var webtorrent = require('./lib/webTorrentNode')
39 40
40 // Get configurations 41 // Get configurations
41 var port = config.get('listen.port') 42 var port = config.get('listen.port')
42 43
44 // ----------- Database -----------
45 database.connect()
46
43 // ----------- Command line ----------- 47 // ----------- Command line -----------
44 48
45 // ----------- App ----------- 49 // ----------- App -----------
@@ -153,7 +157,7 @@
153 // Activate the pool requests 157 // Activate the pool requests
154 poolRequests.activate() 158 poolRequests.activate()
155 159
156 videos.seedAll(function () { 160 videos.seedAllExisting(function () {
157 logger.info('Seeded all the videos') 161 logger.info('Seeded all the videos')
158 logger.info('Server listening on port %d', port) 162 logger.info('Server listening on port %d', port)
159 app.emit('ready') 163 app.emit('ready')