From ece4f9d21f2844e3147c868374b8756f02e46723 Mon Sep 17 00:00:00 2001 From: cyrian simard Date: Sun, 30 Jul 2023 13:35:21 +0200 Subject: [PATCH] fix db connection with dotEnv --- server/server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/server.js b/server/server.js index 3d28f7e99..83a2d1d82 100644 --- a/server/server.js +++ b/server/server.js @@ -4,7 +4,6 @@ const cors = require('cors') const swaggerUi = require('swagger-ui-express') const yaml = require('yamljs') const swaggerDocs = yaml.load('./swagger.yaml') -const dbConnection = require('./database/connection') dotEnv.config() @@ -12,6 +11,7 @@ const app = express() const PORT = process.env.PORT || 3001 // Connect to the database +const dbConnection = require('./database/connection') dbConnection() // Handle CORS issues