We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 066b6d7 commit bd7faf2Copy full SHA for bd7faf2
3 files changed
server/.gitignore
@@ -1,2 +1,2 @@
1
node_modules
2
-keys.js
+dev.js
server/config/keys.js
@@ -0,0 +1,8 @@
+// keys.js - figure out what set of credentials to return
+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
@@ -0,0 +1,7 @@
+// prod.js - production keys here!!
+module.exports = {
+ googleClientID: process.env.GOOGLE_CLIENT_ID,
+ googleClientSecret: process.env.GOOGLE_CLIENT_SECRET,
+ mongoURI: process.env.MONGO_URI,
+ cookieKey: process.env.COOKIE_KEY
+};
0 commit comments