https://github.com/jayvirrathi/restify-rest-api
REST API with Node.js, MongoDB, Restify & JWT
https://github.com/jayvirrathi/restify-rest-api
mongodb nodejs rest-api restify
Last synced: about 2 months ago
JSON representation
REST API with Node.js, MongoDB, Restify & JWT
- Host: GitHub
- URL: https://github.com/jayvirrathi/restify-rest-api
- Owner: Jayvirrathi
- License: mit
- Created: 2021-02-07T16:46:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-14T07:16:40.000Z (over 5 years ago)
- Last Synced: 2025-02-27T16:52:40.799Z (over 1 year ago)
- Topics: mongodb, nodejs, rest-api, restify
- Language: JavaScript
- Homepage:
- Size: 115 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Restify REST API with Node.js, MongoDB
> A Basic Node.js project with JWT
## Build Setup
```bash
# install dependencies
npm install
# serve at http://localhost:4000/
npm start
```
## Prerequisites
- Nodejs
- MongoDB
**Request:**
```json
POST auth/register
{
"email": "elon@gmail.com",
"password": "test@1234"
}
POST api/auth
{
"email": "elon@gmail.com",
"password": "test@1234"
}
POST api/debtors
{
"name": "bill",
"email": "bill@gmail.com",
"phone": "9999988888",
"debt": "5000"
}
GET api/debtors/
GET api/debtors/:id
PUT api/debtors/:id
{
"name": "bill",
"email": "bill@gmail.com",
"phone": "9999988888",
"debt": "6000"
}
DELETE api/debtors/:id
```