Message from JavaScript discussions

August 2018

— :D

— 

Uhm, just wondering if this goes for "behaviour correct" or "to have an instance of a connection" lol

— Both things

— Lol

— Make simplier variant, then upgrade if it survives

— And, is there any way to store an instance of a connection to use it many times?

— Https://stackoverflow.com/questions/17647779/how-to-reuse-mongodb-connection-in-node-js

— Many ways to store in scope1, scope2, scope3... global scope.

— Well this seems to answer my question, I was also around event emitter but sound not a clean way to do it but if I can wrap it inside a function should work

Message permanent page

— Mongoose creates a connection and reuses it

— The problem with globals is as usual, it is not available when you use if if you don't wait for an event or so

Message permanent page

— Oh, ill look for it, thanks