Skip to content

Commit

Permalink
add dotenv
Browse files Browse the repository at this point in the history
  • Loading branch information
zxdhiru committed Oct 5, 2024
1 parent 94861f8 commit 2e9d9fe
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const PORT = process.env.PORT
require("dotenv").config()
const PORT = process.env.PORT
const MONGOOSE_URL = process.env.MONGOOSE_URL

module.exports = {
Expand Down
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "server.js",
"scripts": {
"dev": "node --watch --env-file=.env server.js",
"start": "node --env-file=.env server.js"
"start": "node server.js"
},
"keywords": [
"lms",
Expand All @@ -16,6 +16,7 @@
"license": "ISC",
"dependencies": {
"cors": "^2.8.5",
"dotenv": "^16.4.5",
"express": "^4.21.0",
"mongoose": "^8.6.3"
}
Expand Down

0 comments on commit 2e9d9fe

Please sign in to comment.