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