fix: add dotenv package for environment (#18)
* Added "dotenv" dependency to package.json
Since the project is using .env file for fetching the port, it had no "dotenv" dependency. This creates confusion when "process.env.PORT" doesn't work. I hope this is convenient for beginners 👍
* Update server.js
Added a line to import `dotenv` dependency to server.js.
* Update package-lock.json
I have added the dotenv dependency to package-lock.json file as requested. I hope it's good now
This commit is contained in:
parent
dfe268e836
commit
38d1c3b9f6
5
package-lock.json
generated
5
package-lock.json
generated
@ -90,6 +90,11 @@
|
|||||||
"ms": "2.0.0"
|
"ms": "2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"dotenv": {
|
||||||
|
"version": "8.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
|
||||||
|
"integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw=="
|
||||||
|
},
|
||||||
"depd": {
|
"depd": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
|
||||||
|
@ -8,7 +8,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"express": "^5.0.0-alpha.2",
|
"express": "^5.0.0-alpha.2",
|
||||||
"cors": "^2.8.1"
|
"cors": "^2.8.1",
|
||||||
|
"dotenv": "^8.2.0"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
Loading…
Reference in New Issue
Block a user