Update README.md

master
Raphael Cerveaux 2018-11-14 15:43:28 +01:00 committed by GitHub
parent a6b3bfa193
commit 964886ae8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 39 additions and 10 deletions

View File

@ -2,20 +2,49 @@
RESTful API based on Expressjs. <a href="https://travis-ci.org/sundowndev/api-js-mooc"><img src="https://api.travis-ci.org/sundowndev/api-js-mooc.svg?branch=master" alt="Build status"></a>
## Overview
WARNING: This is for demo purposes. You should not run this in production (no cors, unit tests ...).
### Features
## Features
- Sign up
- Sign in
- CRUD notes
- reset password (optional)
- Sign up/sign in (JWT, bcrypt)
- Create, update, delete, read your notes
- Manage your account: update, delete
### Models
## Call the API
- User: firstname, lastname, email, password
- Note: title, text, author
- Auth: jwt_token, expiration_date
As best practice, use these headers to make requests to the API:
```
Content-Type:application/x-www-form-urlencoded
Accept:application/json
```
## API response
The response code will never be in the response.
**Make operations** (create, update, delete ...)
```js
{
success: false,
message: 'Oups!'
}
```
**Getting objects** (read)
```js
{
"_id": "5bec2fed257ab94172cd3874",
"firstname": "Raphael",
"lastname": "NA",
"username": "sundown",
"createdAt": "2018-11-14T14:23:41.581Z",
"updatedAt": "2018-11-14T14:23:41.581Z",
"__v": 0
}
```
## Specs