]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server.js
Fix module installation (router instead of router-deprecated)
[github/Chocobozzz/PeerTube.git] / server.js
index 024ce10f86c87246b97a9e5d875ce859a652d729..4c8e8cfd39d03b18614e57fb56a1c1d143582871 100644 (file)
--- a/server.js
+++ b/server.js
@@ -64,9 +64,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 +76,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 -----------