Skip to content
Snippets Groups Projects
Commit 71812d49 authored by Yannis Barlas's avatar Yannis Barlas
Browse files

fix(server): fix bundle serving path

parent 5144a321
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,7 @@ const logger = require('@pubsweet/logger')
const registerComponents = require('pubsweet-server/src/register-components')
const api = require('pubsweet-server/src/routes/api')
const index = require('pubsweet-server/src/routes/index')
const configureApp = app => {
const models = require('@pubsweet/models')
......@@ -120,9 +121,7 @@ const configureApp = app => {
config.has('pubsweet-server.serveClient') &&
config.get('pubsweet-server.serveClient')
) {
app.get('*', (req, res) => {
res.sendFile(path.join('.', '_build', 'assets', 'index.html'))
})
app.use('/', index)
}
app.use((err, req, res, next) => {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment