Paul Mathieu
0c9c893237
With jwt authentication. - POST /toktok {password} -> {token} - GET /bandz -> {bandz} - POST /wrap -> {id}
28 lines
384 B
Markdown
28 lines
384 B
Markdown
chikinz
|
|
=======
|
|
|
|
|
|
```
|
|
yarn install
|
|
```
|
|
|
|
Launch:
|
|
```
|
|
node index
|
|
```
|
|
|
|
|
|
Service then available at [http://localhost:3000]
|
|
|
|
Get a token:
|
|
|
|
```
|
|
curl -H 'Content-Type: application/json' -d '{"password": "..."}' http://localhost:3000/toktok
|
|
```
|
|
|
|
Use the token:
|
|
|
|
```
|
|
curl -H 'Content-Type: application/json' -H 'Authorization: Bearer <<token here>>' -d '{data}' http://localhost:3000/wrap
|
|
```
|