What is the best way to have an app only use 1 single db connection? Would it be simple to set it up in a seperate file and export it as a module which i import when required?
Thanks
I rapped my sequelize connection in a module and then require that module when I need a connection. Apart from that if you are using the same connection multiple projects, I just require my wrapper in and listen for an event I fire over the EventEmitter for when the connection is established. That way I share a single connection for each project.