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)
})
// 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 -----------