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

https://github.com/priyangsubanerjee/mongodb-nodejs

Learn how to connect mongoDB atlas with your Node js, React, Next Js project.
https://github.com/priyangsubanerjee/mongodb-nodejs

database mongodb nodejs schema

Last synced: 2 months ago
JSON representation

Learn how to connect mongoDB atlas with your Node js, React, Next Js project.

Awesome Lists containing this project

README

          

# Connect mongoDb with Express app

Hey all, in this repo you will find all the necessary code to connect your express js app to your mongodb database.
All the files are in javascript with the boiler plate code. You can just pull it down and turn your ideas into reality.

## Authors

- 👔 [@priyangsubanerjee](https://www.github.com/priyangsubanerjee)

## Requirements

Developers can upload files (one file at a time) by sending POST request.

- Database
-
- `mongoDb` connection url.
- Database `username` & `password` with read & write permission.

- Packages
-
- `npm i mongoose`
## Installation

```bash
$ git clone https://https://github.com/priyangsubanerjee/mongodb-nodejs.git
$ cd mongodb-nodejs
$ npm install
$ npm start
```

Default `port` is `3000`

- Visit https://localhost:3000 to view your project in browser.
- Open up the terminal in your VsCode and check if `Connected` has been logged.
- Now connection has been established with mongoDb Atlas.

`Note:` Change `username` and `password` parameters with your own database credentials.