created bacis structure and routes for creating user and logging in
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
const mongoose = require("mongoose");
|
||||
const connectDB = async () => {
|
||||
try {
|
||||
const conn = await mongoose.connect(process.env.MONGO_URI);
|
||||
console.log(`MongoDB Connected:${conn.connection.host}`.cyan.underline);
|
||||
} catch (error) {
|
||||
console.log(`Error:${error.message}`.red.underline.bold);
|
||||
process.exit(1);
|
||||
}
|
||||
};
|
||||
module.exports = connectDB;
|
||||
Reference in New Issue
Block a user