In my code I am connecting to our db like so. The file where the code is defined is required in the Express main entry file. Everything works perfectly, however I am wonderi