Replies: 2 comments 2 replies
-
Take a look at our Lambda docs: https://mongoosejs.com/docs/lambda.html |
Beta Was this translation helpful? Give feedback.
2 replies
-
The following posts may help. Dealing with a database with Next.js API routes How do you share a database connection between API routes in NextJS 13? What Happens When a Module Is Imported Twice? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
i was wondering if the code below is the best way to avoid connecting to mongoDb every time an api request is made in nextJs
I am hoping anyone who has used mongoDb and nextJs in production can advise me so i don't run into the "too many connections" error
Beta Was this translation helpful? Give feedback.
All reactions