diff --git a/config/production.json b/config/production.json new file mode 100644 index 0000000..d63d7d0 --- /dev/null +++ b/config/production.json @@ -0,0 +1,4 @@ +{ + "login_path" : "http://naturalcrit.com/login", + "log_level" : "warn" +} diff --git a/config/staging.json b/config/staging.json new file mode 100644 index 0000000..5887cc4 --- /dev/null +++ b/config/staging.json @@ -0,0 +1,4 @@ +{ + "login_path" : "http://staging.naturalcrit.com/login", + "log_level" : "trace" +} diff --git a/server/dev.routes.js b/server/dev.routes.js index 5b8d1df..ffda6b3 100644 --- a/server/dev.routes.js +++ b/server/dev.routes.js @@ -3,6 +3,8 @@ const jwt = require('jwt-simple'); const auth = require('basic-auth'); const config = require('nconf'); +if(process.env.NODE_ENV == 'production') throw 'Loading dev routes in prod. ABORT ABORT'; + router.get('/dev/login', (req, res, next) => { const user = req.query.user;