Update README.md

This commit is contained in:
Víctor Martínez 2021-07-25 04:29:20 +02:00 committed by GitHub
parent c3997c47fa
commit e0b77213ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,14 +5,48 @@
</a>
</p>
> Nodejs CRUD app using Firebase & Firestore
## BUILD
```npm run build```
## RUN
```npm run start```
## DOCS
### API Authentication
To make any request to the sentences or translation api you will need to provide an authorization header:
```{ 'Authorization': 'Bearer <token>' }```
### Sentences API
+ Endpoint: `https://sentences-crud.herokuapp.com/api/v1/sentences`
+ operations:
+ + GET /?[lastId=string]&[orderBy=string]&[order='asc' | 'desc']
+ + GET /:id
+ + POST /:id { text: string, category: string }
+ + PUT /:id { text?: string, category?: string }
+ + DELETE /:id
### Translation API
+ Endpoint: `https://sentences-crud.herokuapp.com/api/v1/translate`
+ operations:
+ + POST / { sentence: string }
### Sentences views
You can access the views from `https://sentences-crud.herokuapp.com`
From this webpage you can perform any operation you can do with the sentences API
### TODO
- Test sentences component