Initial commit

This commit is contained in:
kihong.kim
2026-01-24 19:41:19 +09:00
commit 807df3d678
90 changed files with 6411 additions and 0 deletions

14
backend/config/db.js Normal file
View File

@@ -0,0 +1,14 @@
const mongoose = require("mongoose");
const connectDb = async () => {
const mongoUri = process.env.MONGODB_URI;
if (!mongoUri) {
throw new Error("MONGODB_URI is not set");
}
mongoose.set("strictQuery", true);
await mongoose.connect(mongoUri);
return mongoose.connection;
};
module.exports = connectDb;