https://github.com/rwieruch/fullstack-express-mongodb-boilerplate
https://github.com/rwieruch/fullstack-express-mongodb-boilerplate
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rwieruch/fullstack-express-mongodb-boilerplate
- Owner: rwieruch
- Created: 2020-04-30T12:13:00.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-12T08:15:58.000Z (over 5 years ago)
- Last Synced: 2024-11-01T11:34:36.938Z (11 months ago)
- Language: JavaScript
- Size: 41 KB
- Stars: 17
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Fullstack Express + MongoDB Server
[](https://travis-ci.org/rwieruch/fullstack-express-mongodb-boilerplate) [](https://slack-the-road-to-learn-react.wieruch.com/) [](https://greenkeeper.io/)
An easy way to get started with a Express server with MongoDB with Node.js. [Read more about it.](https://www.robinwieruch.de/mongodb-express-setup-tutorial/)
## Features
- Express
- REST API
- MongoDB## Requirements
- [node & npm](https://nodejs.org/en/)
- [git](https://www.robinwieruch.de/git-essential-commands/)## Installation
- `git clone git@github.com:rwieruch/fullstack-express-mongodb-boilerplate.git`
- `cd fullstack-express-mongodb-boilerplate`
- `npm install`
- [start MongoDB](https://www.robinwieruch.de/mongodb-express-setup-tutorial/)
- `npm start`
- optional: include _.env_ in your _.gitignore_### GET Routes
- visit http://localhost:3000
- /messages
- /messages/1
- /users
- /users/1### Beyond GET Routes
#### CURL
- Create a message with:
- `curl -X POST -H "Content-Type:application/json" http://localhost:3000/messages -d '{"text":"Hi again, World"}'`
- Delete a message with:
- `curl -X DELETE -H "Content-Type:application/json" http://localhost:3000/messages/1`#### Postman
- Install [Postman](https://www.getpostman.com/apps) to interact with REST API
- Create a message with:
- URL: http://localhost:3000/messages
- Method: POST
- Body: raw + JSON (application/json)
- Body Content: `{ "text": "Hi again, World" }`
- Delete a message with:
- URL: http://localhost:3000/messages/1
- Method: DELETE