'Redis Node – close all connections

Is there any command or library in Node that would help me close all of the Redis connections?

I know I can track my connections and try to quit them inside process.on('exit', ...), yet I'd like to have a fallback method that closes all the connections first, before initiating new ones.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source