- // Create/activate the webtorrent module
- webtorrent.create(function () {
- function cleanForExit () {
- utils.cleanForExit(webtorrent.app)
- }
-
- function exitGracefullyOnSignal () {
- process.exit(-1)
- }
-
- process.on('exit', cleanForExit)
- process.on('SIGINT', exitGracefullyOnSignal)
- process.on('SIGTERM', exitGracefullyOnSignal)
-
- // ----------- Make the server listening -----------
- server.listen(port, function () {
- // Activate the pool requests
- Request.activate()
-
- 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')
- })
- })
+ // ----------- Make the server listening -----------
+ server.listen(port, function () {
+ // Activate the pool requests
+ Request.activate()
+
+ logger.info('Server listening on port %d', port)
+ logger.info('Webserver: %s', constants.CONFIG.WEBSERVER.URL)
+
+ app.emit('ready')