Skip to content

Commit fa0885c

Browse files
author
Rajat
committed
db build fixes
1 parent fc706f0 commit fa0885c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

apps/web/auth.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ import { updateUserAfterCreationViaAuth } from "./graphql/users/logic";
1212
import UserModel from "@models/User";
1313
import { getBackendAddress } from "./app/actions";
1414

15-
const client = new MongoClient(process.env.DB_CONNECTION_STRING || "");
15+
const client = new MongoClient(
16+
process.env.DB_CONNECTION_STRING || "mongodb://localhost:27017",
17+
);
1618
const db = client.db();
1719

1820
const config: any = {

apps/web/services/db.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default async function connectToDatabase(): Promise<MongoClient> {
1212
};
1313

1414
const dbConnection = await mongoose.connect(
15-
process.env.DB_CONNECTION_STRING || "",
15+
process.env.DB_CONNECTION_STRING || "mongodb://localhost:27017",
1616
options,
1717
);
1818
return dbConnection.connection.getClient() as unknown as MongoClient;

0 commit comments

Comments
 (0)