https://github.com/jayvirrathi/fastify-rest-api
A fast REST APIs with Node.js, MongoDB, Fastify and Swagger.
https://github.com/jayvirrathi/fastify-rest-api
fastify mongodb nodejs rest-api swagger
Last synced: about 2 months ago
JSON representation
A fast REST APIs with Node.js, MongoDB, Fastify and Swagger.
- Host: GitHub
- URL: https://github.com/jayvirrathi/fastify-rest-api
- Owner: Jayvirrathi
- License: mit
- Created: 2021-02-06T05:45:15.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-06T10:08:26.000Z (over 5 years ago)
- Last Synced: 2025-08-31T10:40:54.372Z (10 months ago)
- Topics: fastify, mongodb, nodejs, rest-api, swagger
- Language: JavaScript
- Homepage:
- Size: 93.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# A fast REST APIs with Node.js, MongoDB, Fastify and Swagger.
> A Node.js project
## Build Setup
```bash
# install dependencies
npm install
# serve with hot reload at localhost:3000
npm start
```
## Prerequisites
- Nodejs
- MongoDB
**Request:**
```json
POST api/cars
{
"title": "Model X",
"brand": "Tesla",
"price": "100000",
"age": "1",
"services": {
"state": "United State",
"city": "San Diegoo"
}
}
GET api/cars
GET api/cars/:id
PUT api/cars/:id
{
"title": "Model X",
"brand": "Tesla",
"price": "150000",
"age": "1",
"services": {
"state": "United State",
"city": "Las Vegas"
}
}
DELETE api/cars/:id
```