From fa034c83de3e8df571946df121e8d7e646fa39db Mon Sep 17 00:00:00 2001 From: SomesH S Date: Mon, 27 May 2024 18:51:46 +0000 Subject: [PATCH] database.js - connectDB -> connectDatabase --- be/src/helpers/database.js | 4 ++-- be/src/helpers/server.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/be/src/helpers/database.js b/be/src/helpers/database.js index 13fff61..cd9064a 100644 --- a/be/src/helpers/database.js +++ b/be/src/helpers/database.js @@ -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'); @@ -10,4 +10,4 @@ const connect = async () => { } }; -export { connect }; +export { connectDatabase }; diff --git a/be/src/helpers/server.js b/be/src/helpers/server.js index 62eb888..495cb75 100644 --- a/be/src/helpers/server.js +++ b/be/src/helpers/server.js @@ -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 = () => { @@ -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}`);