diff --git a/restapi/modules/gestorDB.ts b/restapi/modules/gestorDB.ts index 4fe50d5..b61c72a 100644 --- a/restapi/modules/gestorDB.ts +++ b/restapi/modules/gestorDB.ts @@ -2,10 +2,10 @@ const mongoose = require('mongoose') require('dotenv').config() -const uri: string = process.env.MONGO_URI!; + export function connect(){ - mongoose.connect(uri, { + mongoose.connect(process.env.MONGO_URI!, { useNewUrlParser: true, useUnifiedTopology: true })