How to import a namespace in TypeScript

Sometimes you want to export a custom package (namespace with several classes) and use it with a single import command. Export a namespace Let’s say you have a folder called “Logging” with an interface and a class in it. The namespace and the classname must both be exported.

Then you need to setup a file called…

node.js mysql close aborted connections

When using node.js with node-mysql, you may get aborted mysql connections when stopping the app by CTRL+C or otherwise.

This is because the mysql connection idles, and you have to implement a function to quit the connection for mysql not showing it as aborted. This event is triggered when a SIGINT signal is sent…