From c0722ea020d6ed0a460957f73e9d43f0dc5abac9 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sat, 24 Feb 2024 17:21:27 -0500 Subject: [PATCH] update dbname --- api/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/index.ts b/api/index.ts index 40078d4..e212c32 100644 --- a/api/index.ts +++ b/api/index.ts @@ -17,6 +17,7 @@ import morgan from "morgan"; const port = process.env.SERVER_PORT || 3080; const database = process.env.MONGO_URI || "mongodb://localhost:27017"; +const dbName = process.env.MONGO_DB || "lost_and_found_dev"; // https://medium.com/bb-tutorials-and-thoughts/how-to-develop-and-build-react-app-with-nodejs-backend-typescript-version-27a6a283a7c5 // https://github.com/bbachi/react-nodejs-typescript-example @@ -35,6 +36,7 @@ mongoose useNewUrlParser: true, useUnifiedTopology: true, useCreateIndex: true, + dbName, }) .then(() => console.log("Connected to " + database)) .catch(() => console.log("Failed to connect to DB at: " + database));