Skip to content

Commit

Permalink
Merge pull request #14 from piyush97/piyush97-keyEncryption
Browse files Browse the repository at this point in the history
Piyush97 key encryption
  • Loading branch information
piyush97 authored Aug 26, 2018
2 parents 352922a + fd488e5 commit 261fa09
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ node_modules
jspm_packages

# Serverless directories
.serverless
.serverless

/config/keys_dev.js
4 changes: 4 additions & 0 deletions config/key_prod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
mongoURI: process.env.MONGO_URI,
secretOrKey: process.env.SECRET_OR_KEY,
};
10 changes: 6 additions & 4 deletions config/keys.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module.exports = {
mongoURI: 'mmongodb://piyush:piyush1@ds123852.mlab.com:23852/slika',
secretOrKey: 'secret',
};

if (process.env.NODE_ENV === 'production') {
module.exports = require('./key_prod');
} else {
module.exports = require('./key_dev');
}

0 comments on commit 261fa09

Please sign in to comment.