Make connection to db non-async

This commit is contained in:
2023-12-01 20:33:04 -05:00
parent f9166de925
commit 6e7f968b06

View File

@ -11,7 +11,7 @@ if (!url) {
throw new Error('MONGODB_URI is not defined in the .env file.');
}
const dbconnect = async () =>{
const dbconnect = () => {
mongoose.connect(url)
.then(() => {
console.log('Connected to MongoDB');