X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server.js;h=63aeb7145959348f3e406cae86cfa70132616e58;hb=aaf61f3810e6d57c5130af959bd2860df32775e7;hp=024ce10f86c87246b97a9e5d875ce859a652d729;hpb=cd0e4b1acfbd4cc393f6cfcab718d66e25193fbd;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server.js b/server.js index 024ce10f8..63aeb7145 100644 --- a/server.js +++ b/server.js @@ -31,7 +31,6 @@ const logger = require('./server/helpers/logger') const poolRequests = require('./server/lib/requestsScheduler') const routes = require('./server/controllers') const utils = require('./server/helpers/utils') -const videos = require('./server/lib/videos') const webtorrent = require('./server/lib/webtorrent') // Get configurations @@ -64,9 +63,9 @@ const apiRoute = '/api/' + constants.API_VERSION app.use(apiRoute, routes.api) // Static files -app.use('/app', express.static(path.join(__dirname, '/client'), { maxAge: 0 })) +app.use('/client', express.static(path.join(__dirname, '/client/dist'), { maxAge: 0 })) // 404 for static files not found -app.use('/app/*', function (req, res, next) { +app.use('/client/*', function (req, res, next) { res.sendStatus(404) }) @@ -76,7 +75,7 @@ app.use(constants.THUMBNAILS_STATIC_PATH, express.static(thumbnailsPhysicalPath, // Client application app.use('/*', function (req, res, next) { - res.sendFile(path.join(__dirname, 'client/index.html')) + res.sendFile(path.join(__dirname, 'client/dist/index.html')) }) // ----------- Tracker ----------- @@ -138,11 +137,11 @@ installer.installApplication(function (err) { // Activate the pool requests poolRequests.activate() - videos.seedAllExisting(function () { + // videos.seedAllExisting(function () { logger.info('Seeded all the videos') logger.info('Server listening on port %d', port) app.emit('ready') - }) + // }) }) }) })