How to connect to MySQL / MariaDB using Node.JS (the right way)
Use a connection pool. It helps Conserve resource, connections got recycled Better reliability: it automatically reconnects when there’s a problem How? Simple, instead of creating a connection, just create a pool. It’s designed as a drop in replacement for client.query()…