Fix #1079 404 error on home page

This commit is contained in:
typicode
2020-02-23 10:15:53 +01:00
parent d945126702
commit f67677fb24
5 changed files with 1 additions and 1 deletions

View File

Before

Width:  |  Height:  |  Size: 318 B

After

Width:  |  Height:  |  Size: 318 B

View File

@ -9,7 +9,7 @@ const bodyParser = require('./body-parser')
module.exports = function(opts) { module.exports = function(opts) {
const userDir = path.join(process.cwd(), 'public') const userDir = path.join(process.cwd(), 'public')
const defaultDir = path.join(__dirname, '../front') const defaultDir = path.join(__dirname, '../../public')
const staticDir = fs.existsSync(userDir) ? userDir : defaultDir const staticDir = fs.existsSync(userDir) ? userDir : defaultDir
opts = Object.assign({ logger: true, static: staticDir }, opts) opts = Object.assign({ logger: true, static: staticDir }, opts)