You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

10 lines
232 B

import 'dotenv/config';
import mongoose from 'mongoose';
export const mongouri = process.env.DB_URI!;
mongoose
.connect(mongouri)
.then(() => console.log('Connected to db'))
.catch((e) => console.error('Couldnt connect', e));