Skip to content

Commit

Permalink
database.js - connectDB -> connectDatabase
Browse files Browse the repository at this point in the history
  • Loading branch information
sssomeshhh committed May 27, 2024
1 parent dd6a9d3 commit fa034c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions be/src/helpers/database.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {mng} from "./imports.js";

const connect = async () => {
const connectDatabase = async () => {
try {
await mng.connect('mongodb://localhost:27017/', { dbName: "rentify" });
console.log('[server] MongoDB connected');
Expand All @@ -10,4 +10,4 @@ const connect = async () => {
}
};

export { connect };
export { connectDatabase };
4 changes: 2 additions & 2 deletions be/src/helpers/server.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { crs, exp, pth, url } from "./imports.js";

import { connect as connectDB } from "./database.js";
import { connectDatabase } from "./database.js";
import { apiRouter } from "./routers.js";

const startServer = () => {
Expand Down Expand Up @@ -32,7 +32,7 @@ const startServer = () => {
res.sendFile(`${staticDir}/index.html`)
});

connectDB().then(() => {});
connectDatabase().then(() => {});

app.listen(serverPort, () => {
console.log(`[server] Listening on port ${serverPort}`);
Expand Down

0 comments on commit fa034c8

Please sign in to comment.