Database connection dies after first call
Open in Discord
DentFuse posted this in #help-forum
Hello everyone, I'm trying to connect to a MongoDB database via the API routes provided by Next. The first requestr goes though and a connection is made to the server, but all further request get lost because it keeps trying to connect to the database again and again. I can seem to get caching working. Please help. Attached my code.