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

13
backend/config/api.js Normal file
View File

@@ -0,0 +1,13 @@
const weatherBaseUrl = "https://api.openweathermap.org/data/2.5";
const config = {
weather: {
baseUrl: weatherBaseUrl,
apiKey: process.env.OPENWEATHER_API_KEY || "",
city: process.env.WEATHER_CITY || "Seoul",
units: process.env.WEATHER_UNITS || "metric",
language: process.env.WEATHER_LANG || "en",
},
};
module.exports = config;

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;