Skip to content

Commit

Permalink
Added config folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Aman-Codes committed Jan 8, 2021
1 parent 7e8406d commit 1a96176
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/node_modules
/config
.DS_Store

keys.js
Expand Down
10 changes: 10 additions & 0 deletions config/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
require('dotenv').config()

const Port = process.env.NODE_ENV === 'test' ? 4001 : (process.env.PORT || 4000);

const MongodbUrl = process.env.NODE_ENV === 'production' ? process.env.MONGODB_URL_PRODUCTION : (process.env.MONGODB_URL_DEVELOPMENT || 'mongodb://localhost/medbuddy')

module.exports = {
Port: Port,
MongodbUrl: MongodbUrl
}

0 comments on commit 1a96176

Please sign in to comment.