mirror of
https://github.com/pa11y/pa11y-dashboard.git
synced 2025-09-24 14:21:13 +00:00
allow for .js config
This commit is contained in:

committed by
Rowan Manning

parent
c2b1b1d1a1
commit
344efb9da3
@@ -18,9 +18,12 @@
|
||||
const fs = require('fs');
|
||||
const environment = (process.env.NODE_ENV || 'development');
|
||||
const jsonPath = `./config/${environment}.json`;
|
||||
const jsPath = `./config/${environment}.js`;
|
||||
|
||||
if (fs.existsSync(jsonPath)) {
|
||||
module.exports = require(jsonPath);
|
||||
} else if (fs.existsSync(jsPath)) {
|
||||
module.exports = require(jsPath);
|
||||
} else {
|
||||
module.exports = {
|
||||
port: Number(env('PORT', '4000')),
|
||||
|
Reference in New Issue
Block a user