Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mongodb-developer/mongodb-express-rest-api-example
Example for the article on MongoDB and Express JS web REST API tutorial
https://github.com/mongodb-developer/mongodb-express-rest-api-example
expressjs mongodb mongodb-driver node-js rest-api
Last synced: 5 days ago
JSON representation
Example for the article on MongoDB and Express JS web REST API tutorial
- Host: GitHub
- URL: https://github.com/mongodb-developer/mongodb-express-rest-api-example
- Owner: mongodb-developer
- License: apache-2.0
- Created: 2021-08-09T14:09:20.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-22T11:34:24.000Z (6 months ago)
- Last Synced: 2024-12-30T04:09:17.751Z (12 days ago)
- Topics: expressjs, mongodb, mongodb-driver, node-js, rest-api
- Language: JavaScript
- Homepage:
- Size: 1.13 MB
- Stars: 136
- Watchers: 11
- Forks: 185
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MongoDB and Express.js REST API sample application
This repository contains the sample application for the [MongoDB and Express.js REST API tutorial](https://www.mongodb.com/languages/express-mongodb-rest-api-tutorial).
## How To Run
1. You can follow the [Getting Started with Atlas](https://docs.atlas.mongodb.com/getting-started/) guide, to learn how to create a free Atlas account, create your first cluster and get your Connection String to the database.
Then, set the Atlas URI connection parameter in `server/.env` to your Connection String:
```
ATLAS_URI=mongodb+srv://:@sandbox.jadwj.mongodb.net/myFirstDatabase?retryWrites=true&w=majority
```2. Start the Express server:
```
cd server
npm install
npm run dev
```3. Start the React app (in a new terminal window):
```
cd app
npm install
npm start
```## Disclaimer
Use at your own risk; not a supported MongoDB product