Skip to content

Commit

Permalink
refactored mongodb uri's env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
mt-fns committed Jan 3, 2025
1 parent 16df13a commit cdcec4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/src/ratingDbInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import dotenv from "dotenv";
import { Collection, MongoClient } from "mongodb";
dotenv.config({ path: "src/.env.local" });

const uri: string | undefined = process.env.MONGODB_URI;
const uri: string | undefined =
`mongodb+srv://${process.env.MONGODB_USERNAME}:${process.env.MONGODB_PASSWORD}@${process.env.MONGODB_SERVICE_HOSTNAME}`;

export async function insertRating(
roomId: string,
Expand Down

0 comments on commit cdcec4e

Please sign in to comment.