DEV Community

Discussion on: Adding MongoDB (Mongoose) to Next.js APIs

Collapse
 
nasiruddinsaiyed profile image
Nasiruddin Saiyed • Edited

Well explained, +1, but it will not work if we are exporting next project into static site using next export. [nextjs.org/docs/api-routes/introdu...]

dev-to-uploads.s3.amazonaws.com/i/...

Collapse
 
raphaelchaula profile image
Raphael Chaula

Yes, API routes only work server side (Lambdas) in Next.js.