X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server.js;h=9322bca19e500038fced0335f8a644a09c786248;hb=907e9510c28b4b2816cba0c070e3feaa16b10ac3;hp=33e34019d96333f80f9b57fa60db0d9947f099b8;hpb=00057e85a703713a8f0d96e01c49978be0987eb2;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server.js b/server.js index 33e34019d..9322bca19 100644 --- a/server.js +++ b/server.js @@ -37,6 +37,7 @@ const routes = require('./server/controllers') const utils = require('./server/helpers/utils') const webtorrent = require('./server/lib/webtorrent') const Request = mongoose.model('Request') +const Video = mongoose.model('Video') // Get configurations const port = config.get('listen.port') @@ -139,11 +140,13 @@ installer.installApplication(function (err) { // Activate the pool requests Request.activate() - // videos.seedAllExisting(function () { + Video.seedAllExisting(function (err) { + if (err) throw err + logger.info('Seeded all the videos') logger.info('Server listening on port %d', port) app.emit('ready') - // }) + }) }) }) })