웹 서버 배포 시도

This commit is contained in:
fiore 2025-03-13 13:34:48 +09:00
parent 5deb1bced4
commit f1bd640978
3 changed files with 15 additions and 1 deletions

2
app.js
View File

@ -32,7 +32,7 @@ app.use(session({
}));
async function connectDB(){
var databaseUrl = "mongodb://localhost:27017/DegullMok";
var databaseUrl = process.env.DB_URL || "mongodb://localhost:27017/DegullMok";
// MongoDB 연결
try {

13
package-lock.json generated
View File

@ -11,6 +11,7 @@
"bcrypt": "^5.1.1",
"cookie-parser": "~1.4.4",
"debug": "~2.6.9",
"dotenv": "^16.4.7",
"express": "^4.21.2",
"express-session": "^1.18.1",
"http-errors": "~1.6.3",
@ -645,6 +646,18 @@
"integrity": "sha512-LLBi6pEqS6Do3EKQ3J0NqHWV5hhb78Pi8vvESYwyOy2c31ZEZVdtitdzsQsKb7878PEERhzUk0ftqGhG6Mz+pQ==",
"license": "MIT"
},
"node_modules/dotenv": {
"version": "16.4.7",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz",
"integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==",
"license": "BSD-2-Clause",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://dotenvx.com"
}
},
"node_modules/dunder-proto": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",

View File

@ -9,6 +9,7 @@
"bcrypt": "^5.1.1",
"cookie-parser": "~1.4.4",
"debug": "~2.6.9",
"dotenv": "^16.4.7",
"express": "^4.21.2",
"express-session": "^1.18.1",
"http-errors": "~1.6.3",