https://github.com/valmirphp/json-server
sample json-server authorization token
https://github.com/valmirphp/json-server
Last synced: 4 months ago
JSON representation
sample json-server authorization token
- Host: GitHub
- URL: https://github.com/valmirphp/json-server
- Owner: valmirphp
- Created: 2019-06-09T00:25:22.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-22T11:21:47.000Z (over 3 years ago)
- Last Synced: 2024-04-20T15:54:54.305Z (almost 2 years ago)
- Language: TypeScript
- Homepage:
- Size: 261 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- awesome-systools - JSON-SERVER With Authorization JWT - server authorization token. (Tools / WebTools)
README
# JSON-SERVER With Authorization JWT
Sample adapter https://github.com/typicode/json-server ...
## Run dev
```
npm run dev
```
## Start server
```
npm run server
```
## Insomnia
Para testar vc pode carregar o ambiente da pasta `./insomnia/` em aplicativo Insomnia.
## Rotas
### Login
POST http://localhost:3001/login
body:
```json
{
"email": "admin@admin.com",
"password": "admin"
}
```
## Resource USER (CRUD)
> use authorization bearer
GET http://localhost:3001/users?q=
GET http://localhost:3001/users/{id}
POST http://localhost:3001/users
PUT http://localhost:3001/users/{id}
DELETE http://localhost:3001/users/{id}