aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.js
diff options
context:
space:
mode:
Diffstat (limited to 'server.js')
-rw-r--r--server.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/server.js b/server.js
index 65cf69f7d..d3d3661ad 100644
--- a/server.js
+++ b/server.js
@@ -69,6 +69,7 @@ app.use(expressValidator({
69// API routes 69// API routes
70const apiRoute = '/api/' + constants.API_VERSION 70const apiRoute = '/api/' + constants.API_VERSION
71app.use(apiRoute, routes.api) 71app.use(apiRoute, routes.api)
72app.use('/', routes.client)
72 73
73// Static files 74// Static files
74app.use('/client', express.static(path.join(__dirname, '/client/dist'), { maxAge: constants.STATIC_MAX_AGE })) 75app.use('/client', express.static(path.join(__dirname, '/client/dist'), { maxAge: constants.STATIC_MAX_AGE }))
@@ -88,12 +89,9 @@ app.use(constants.STATIC_PATHS.WEBSEED, cors(), express.static(videosPhysicalPat
88const thumbnailsPhysicalPath = constants.CONFIG.STORAGE.THUMBNAILS_DIR 89const thumbnailsPhysicalPath = constants.CONFIG.STORAGE.THUMBNAILS_DIR
89app.use(constants.STATIC_PATHS.THUMBNAILS, express.static(thumbnailsPhysicalPath, { maxAge: constants.STATIC_MAX_AGE })) 90app.use(constants.STATIC_PATHS.THUMBNAILS, express.static(thumbnailsPhysicalPath, { maxAge: constants.STATIC_MAX_AGE }))
90 91
91// Client application 92// Always serve index client page
92app.use('/videos/embed', function (req, res, next) {
93 res.sendFile(path.join(__dirname, 'client/dist/standalone/videos/embed.html'))
94})
95app.use('/*', function (req, res, next) { 93app.use('/*', function (req, res, next) {
96 res.sendFile(path.join(__dirname, 'client/dist/index.html')) 94 res.sendFile(path.join(__dirname, './client/dist/index.html'))
97}) 95})
98 96
99// ----------- Tracker ----------- 97// ----------- Tracker -----------