Skip to content

Melalli29/Orderpage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Orderpage

// backend/config/db.js const mongoose = require('mongoose'); const dotenv = require('dotenv');

dotenv.config();

const connectDB = async () => { try { await mongoose.connect(process.env.MONGO_URI, { useNewUrlParser: true, useUnifiedTopology: true, }); console.log('MongoDB connected'); } catch (error) { console.error('MongoDB connection failed:', error); process.exit(1); } };

module.exports = connectDB;

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published