Skip to content

Commit c868ab1

Browse files
Serve static common/ dir relative to __dirname
1 parent 49fb741 commit c868ab1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/create-app.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const config = require('./server-config')
2121
const defaults = require('../config/defaults')
2222
const options = require('./handlers/options')
2323
const debug = require('./debug').authentication
24+
const path = require('path')
2425

2526
const corsSettings = cors({
2627
methods: [
@@ -51,7 +52,7 @@ function createApp (argv = {}) {
5152
initViews(app, configPath)
5253

5354
// Serve the public 'common' directory (for shared CSS files, etc)
54-
app.use('/common', express.static('common'))
55+
app.use('/common', express.static(path.join(__dirname, '../common')))
5556

5657
// Add CORS proxy
5758
if (argv.proxy) {

0 commit comments

Comments
 (0)