Skip to content

Commit 96c3842

Browse files
authored
Merge pull request #48 from mberneti/patch-1
Added a valid JWT for testing in development mode
2 parents ef56c20 + 2c6ff88 commit 96c3842

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,19 @@ Koa is a new web framework designed by the team behind Express, which aims to be
1212

1313
Through a Travis-Heroku CI pipeline, this boilerplate is deployed [here](https://node-typescript-koa-rest.herokuapp.com/)! You can try to make requests to the different defined endpoints and see how it works. The following Authorization header will have to be set (already signed with the boilerplate's secret) to pass the JWT middleware:
1414

15-
HEADER
15+
HEADER (DEMO)
1616
```
1717
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEiLCJuYW1lIjoiSmF2aWVyIEF2aWxlcyIsImVtYWlsIjoiYXZpbGVzbG9wZXouamF2aWVyQGdtYWlsLmNvbSJ9.7oxEVGy4VEtaDQyLiuoDvzdO0AyrNrJ_s9NU3vko5-k
1818
```
1919

20-
AVAILABLE ENDPOINTS [SWAGGER DOCS](https://node-typescript-koa-rest.herokuapp.com/swagger-html)
20+
AVAILABLE ENDPOINTS DEMO [SWAGGER DOCS DEMO](https://node-typescript-koa-rest.herokuapp.com/swagger-html)
21+
22+
When running the project locally with `watch-server`, being `.env` file config the very same as `.example.env` file, the swagger docs will be deployed at: `http:localhost:3000/swagger-html`, and the bearer token for authorization should be as follows:
23+
24+
HEADER (LOCALHOST BASED ON DEFAULT SECRET KEY 'your-secret-whatever')
25+
```
26+
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEiLCJuYW1lIjoiSmF2aWVyIEF2aWxlcyIsImVtYWlsIjoiYXZpbGVzbG9wZXouamF2aWVyQGdtYWlsLmNvbSJ9.rgOobROftUYSWphkdNfxoN2cgKiqNXd4Km4oz6Ex4ng
27+
```
2128

2229
| method | resource | description |
2330
|:-------------------|:-----------------|:-----------------------------------------------------------------------------------------------|

0 commit comments

Comments
 (0)