Skip to content

Commit bd7faf2

Browse files
committed
separate keys
1 parent 066b6d7 commit bd7faf2

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

server/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
node_modules
2-
keys.js
2+
dev.js

server/config/keys.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// keys.js - figure out what set of credentials to return
2+
if (process.env.NODE_ENV === 'production') {
3+
// we are in production - return the prod set of keys
4+
module.exports = require('./prod');
5+
} else {
6+
// we are in development - return the dev keys!!!
7+
module.exports = require('./dev');
8+
}

server/config/prod.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// prod.js - production keys here!!
2+
module.exports = {
3+
googleClientID: process.env.GOOGLE_CLIENT_ID,
4+
googleClientSecret: process.env.GOOGLE_CLIENT_SECRET,
5+
mongoURI: process.env.MONGO_URI,
6+
cookieKey: process.env.COOKIE_KEY
7+
};

0 commit comments

Comments
 (0)