Creating A True Singleton In Node.js, With ES6 Symbols

added by JavaScript Kicks
3/10/2016 12:16:43 PM

1542 Views

In Node.js, it's common to use "module.exports" to export an object instance, allowing other files to get the same object instance when requiring the file in question. A lot of people call this the singleton pattern of Node.js, but this isn't really a singleton.


0 comments