Using Mongoose with Next.js 11

Eshwaren M
ITNEXT
Published in
3 min readAug 10, 2021

--

A simple guide to use the Mongoose ORM for MongoDb with the latest version of the Next.js framework.

1. Create a Next.js 11 project

The easiest way to create a Next.js project is by using create-next-app . Run the following command in your terminal.

npx create-next-app my-mongoose-app-name

Once the process is complete, open the project directory with your code editor.

2. Add the environment variable

--

--