]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server.js
Add issue template
[github/Chocobozzz/PeerTube.git] / server.js
index ef26ea773d391483a3ad514381a22e8b103ba89f..4c8e8cfd39d03b18614e57fb56a1c1d143582871 100644 (file)
--- a/server.js
+++ b/server.js
@@ -56,32 +56,27 @@ app.use(expressValidator({
 
 // ----------- Views, routes and static files -----------
 
-// Livereload
-app.use(require('connect-livereload')({
-  port: 35729
-}))
-
 // Catch sefaults
 require('segfault-handler').registerHandler()
 
 // API routes
-const api_route = '/api/' + constants.API_VERSION
-app.use(api_route, routes.api)
+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)
 })
 
 // Thumbnails path for express
-const thumbnails_physical_path = path.join(__dirname, config.get('storage.thumbnails'))
-app.use(constants.THUMBNAILS_STATIC_PATH, express.static(thumbnails_physical_path, { maxAge: 0 }))
+const thumbnailsPhysicalPath = path.join(__dirname, config.get('storage.thumbnails'))
+app.use(constants.THUMBNAILS_STATIC_PATH, express.static(thumbnailsPhysicalPath, { maxAge: 0 }))
 
 // 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 -----------