diff --git a/backend/server.js b/backend/server.js index 52c2679..7b870bf 100644 --- a/backend/server.js +++ b/backend/server.js @@ -167,9 +167,9 @@ process.on("SIGTERM", async () => { console.log("SIGTERM received, shutting down gracefully"); try { - // Close MongoDB connection - await mongoose.connection.close(); - console.log("MongoDB connection closed"); + // Close CouchDB connection + await couchdbService.shutdown(); + console.log("CouchDB connection closed"); // Close server server.close(() => { @@ -186,9 +186,9 @@ process.on("SIGINT", async () => { console.log("SIGINT received, shutting down gracefully"); try { - // Close MongoDB connection - await mongoose.connection.close(); - console.log("MongoDB connection closed"); + // Close CouchDB connection + await couchdbService.shutdown(); + console.log("CouchDB connection closed"); // Close server server.close(() => {