Fix tests

This commit is contained in:
Jake Howard 2017-01-09 20:42:28 +00:00
parent f65dbe491a
commit 2f3eaed6a0
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -7,7 +7,12 @@ const winston = require('winston');
const expressWinston = require('express-winston');
const PORT = process.env.PORT || 5000;
const SERVE_DIR = process.argv[process.argv.length - 1] || 'site/'
let SERVE_DIR;
if (process.env.NODE_ENV === 'test') {
SERVE_DIR = 'site';
} else {
SERVE_DIR = process.argv[process.argv.length - 1];
}
const PAGE_404 = path.join(SERVE_DIR, '.404.html');
const app = express();