Javascript – How to preserve a database connection pool in hooks.server.js during hot reload in SvelteKit with Vite.js and mariadb?
I am using SvelteKit, Vite.js, and the mariadb package with Node.js in my application. I have the following code in the db.js file: import mariadb from 'mariadb'; const databaseConnectionPoolConfig = { ... }; let databaseConnectionPool = undefined; export function createDatabaseConnectionPool()…