From 91e6308a080ab6f93ce313c5569cb104fed6785d Mon Sep 17 00:00:00 2001 From: mohammadreza berneti Date: Sat, 17 Aug 2019 00:42:03 +0430 Subject: [PATCH 1/2] Added a valid JWT for testing in development mode --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d63b74d..a884e38 100644 --- a/README.md +++ b/README.md @@ -12,12 +12,19 @@ Koa is a new web framework designed by the team behind Express, which aims to be 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: -HEADER +HEADER (DEMO) ``` Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEiLCJuYW1lIjoiSmF2aWVyIEF2aWxlcyIsImVtYWlsIjoiYXZpbGVzbG9wZXouamF2aWVyQGdtYWlsLmNvbSJ9.7oxEVGy4VEtaDQyLiuoDvzdO0AyrNrJ_s9NU3vko5-k ``` -AVAILABLE ENDPOINTS [SWAGGER DOCS](https://node-typescript-koa-rest.herokuapp.com/swagger-html) +AVAILABLE ENDPOINTS DEMO [SWAGGER DOCS DEMO](https://node-typescript-koa-rest.herokuapp.com/swagger-html) + +if you run your server locally with `watch-server` and your project `.env` file config as same as `.example.env` config, you can see the swagger docs here: `http:localhost:3000/swagger-html` and you should use below bearer token for authorization + +HEADER (LOCALHOST BASED ON DEFAULT SECRET KEY 'your-secret-whatever') +``` +Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEiLCJuYW1lIjoiSmF2aWVyIEF2aWxlcyIsImVtYWlsIjoiYXZpbGVzbG9wZXouamF2aWVyQGdtYWlsLmNvbSJ9.rgOobROftUYSWphkdNfxoN2cgKiqNXd4Km4oz6Ex4ng +``` | method | resource | description | |:-------------------|:-----------------|:-----------------------------------------------------------------------------------------------| From 2c6ff8888ec5b2b4d5f2395af36dd03aac8c70a7 Mon Sep 17 00:00:00 2001 From: Javier Aviles Date: Mon, 26 Aug 2019 12:33:52 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a884e38..49c511e 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEiLCJuYW1lIjoiSmF2aWVyIEF2 AVAILABLE ENDPOINTS DEMO [SWAGGER DOCS DEMO](https://node-typescript-koa-rest.herokuapp.com/swagger-html) -if you run your server locally with `watch-server` and your project `.env` file config as same as `.example.env` config, you can see the swagger docs here: `http:localhost:3000/swagger-html` and you should use below bearer token for authorization +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: HEADER (LOCALHOST BASED ON DEFAULT SECRET KEY 'your-secret-whatever') ```