From b0a5205aeb624f213c4f3124f7c558784b3d64cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mu=C3=B1iz?= Date: Mon, 2 May 2022 20:27:01 +0200 Subject: [PATCH] Cambio de uri --- restapi/modules/gestorDB.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 })