1
0
mirror of https://github.com/stolksdorf/homebrewery.git synced 2025-12-13 03:25:56 +00:00

Adding in env configs and aextra protection on dev routes

This commit is contained in:
Scott Tolksdorf
2017-01-06 19:50:38 -05:00
parent d77fa0a3dc
commit 0d0f0d8eb0
3 changed files with 10 additions and 0 deletions

4
config/production.json Normal file
View File

@@ -0,0 +1,4 @@
{
"login_path" : "http://naturalcrit.com/login",
"log_level" : "warn"
}

4
config/staging.json Normal file
View File

@@ -0,0 +1,4 @@
{
"login_path" : "http://staging.naturalcrit.com/login",
"log_level" : "trace"
}

View File

@@ -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;