initial commit

This commit is contained in:
Harikrishnan Gopal
2024-12-03 15:53:50 +05:30
commit 956cf14c53
26 changed files with 22820 additions and 0 deletions

12
server/ConnectionDb.js Normal file
View File

@@ -0,0 +1,12 @@
const mongoose = require("mongoose");
require("dotenv").config();
exports.connectdb = () => {
mongoose.connect(process.env.mongoURI);
};
const db = mongoose.connection;
db.on("error", console.error.bind("Connection Error!"));
db.once("open", function () {
console.log("Connection Established!!!");
});