Hi,
what is a good practice to use node-sqlite3 in an Express App? do we have to open and close db for every insert? thanks,
Angelo
No, you open the db when you start the server, then you execute statements whenver you need to. When the app shuts down (e.g. by intercepting SIGINT or SIGKILL), you close the DB handle.
Most helpful comment
No, you open the db when you start the server, then you execute statements whenver you need to. When the app shuts down (e.g. by intercepting SIGINT or SIGKILL), you close the DB handle.