Skip to content

Commit

Permalink
update dbname
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrastopoulos committed Feb 24, 2024
1 parent 5b2eb6e commit c0722ea
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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));
Expand Down

0 comments on commit c0722ea

Please sign in to comment.