aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-02-04 21:10:33 +0100
committerChocobozzz <florian.bigard@gmail.com>2016-02-04 21:10:33 +0100
commitc173e56520b0fe4206b9ea8049b6add40bfeabcd (patch)
tree264c6cbf1bf81a6522685b4be5771bbeef4cd5dc /server.js
parentc45f7f84001c2731909db04dd82e1c1f290386eb (diff)
downloadPeerTube-c173e56520b0fe4206b9ea8049b6add40bfeabcd.tar.gz
PeerTube-c173e56520b0fe4206b9ea8049b6add40bfeabcd.tar.zst
PeerTube-c173e56520b0fe4206b9ea8049b6add40bfeabcd.zip
Split models
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')