An open API service indexing awesome lists of open source software.

https://github.com/emanuelefavero/nextjs-mongoose

A Next.js project using MongoDB as a database with Mongoose as the ODM
https://github.com/emanuelefavero/nextjs-mongoose

api database db mongodb mongoose next nextjs

Last synced: 6 months ago
JSON representation

A Next.js project using MongoDB as a database with Mongoose as the ODM

Awesome Lists containing this project

README

          

# Next.js Mongoose

This is a Next.js project using MongoDB as a database (Mongoose as the ODM)

> Note: An ODM is an Object Document Mapper. It's a library that allows you to interact with your database using objects

## Live Demo

- [https://nextjs-mongoose-tau.vercel.app/](https://nextjs-mongoose-tau.vercel.app/)

## Getting Started

- Add your MongoDB URI to the `MONGODB_URI` environment variable in `.env.local`

> Note: I'm using MongoDB Atlas

- Install dependencies and run the development server:

```bash
npm i
npm run dev
```

## Deploying to Vercel

- Add your MongoDB URI to the `MONGODB_URI` environment variable in Vercel
- Change the server URL in `utils/serverURL.js` to your production Vercel URL