Unfortunately, no.
But I found a good place to start the connection to mongo once the app is started, create a file: instrumentation.ts (root folder). and put the connection function there