| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,7 +14,7 @@ | |||
| 14 | 14 | ||
| 15 | 15 | ## Running your app | |
| 16 | 16 | ||
| 17 | - In the VS Code _Command Palette_ choose "Open Folder in Container" which will launch your application in a Docker container allowing for realtime development and testing. Once launched, the application can be accessed at [http://localhost:3000{{appPrefix}}](http://localhost:3000{{appPrefix}}) and tested using the [VS Code Swagger Viewer](https://marketplace.visualstudio.com/items?itemName=Arjun.swagger-viewer) (`swagger.json`) | ||
| 17 | + In the VS Code _Command Palette_ choose "Open Folder in Container" which will launch your application in a Docker container allowing for realtime development and testing. Once launched, the application can be accessed using the [Swagger UI](https://swagger.io/tools/swagger-ui) at [http://localhost:3000{{appPrefix}}/](http://localhost:3000{{appPrefix}}/) or by using the [VS Code Swagger Viewer](https://marketplace.visualstudio.com/items?itemName=Arjun.swagger-viewer) (`swagger.json`) | ||
| 18 | 18 | ||
| 19 | 19 | ## Deploying to AWS | |
| 20 | 20 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,16 +18,16 @@ exports.handler = async (event, context, callback) => { | |||
| 18 | 18 | const router = new Router(request, response); | |
| 19 | 19 | router.setPrefix(config.router.prefix); | |
| 20 | 20 | ||
| 21 | - // Middleware (order is important). | ||
| 21 | + // Middleware (in execution order). | ||
| 22 | 22 | router.use(accessControlHeaders); | |
| 23 | 23 | router.use(appConfigPlugin(config)); | |
| 24 | 24 | router.use(swaggerUIViewer(swaggerJson)); | |
| 25 | 25 | ||
| 26 | - // Send root response. | ||
| 26 | + // Send root response ({{appPrefix}}/) | ||
| 27 | 27 | router.get('/', function(req, res) { | |
| 28 | 28 | ||
| 29 | 29 | // Redirect to Swagger viewer. | |
| 30 | - res.setHeader('Location', `${config.router.prefix}?swagger-ui=html`); | ||
| 30 | + res.setHeader('Location', `${config.router.prefix}/?swagger-ui=html`); | ||
| 31 | 31 | res.status(301).send(); | |
| 32 | 32 | }); | |
| 33 | 33 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,16 +18,16 @@ exports.handler = (event, context, callback) => { | |||
| 18 | 18 | const router = new Router(request, response); | |
| 19 | 19 | router.setPrefix(config.router.prefix); | |
| 20 | 20 | ||
| 21 | - // Middleware (order is important). | ||
| 21 | + // Middleware (in execution order). | ||
| 22 | 22 | router.use(accessControlHeaders); | |
| 23 | 23 | router.use(appConfigPlugin(config)); | |
| 24 | 24 | router.use(swaggerUIViewer(swaggerJson)); | |
| 25 | 25 | ||
| 26 | - // Send root response. | ||
| 26 | + // Send root response ({{appPrefix}}/) | ||
| 27 | 27 | router.get('/', function(req, res) { | |
| 28 | 28 | ||
| 29 | 29 | // Redirect to Swagger viewer. | |
| 30 | - res.setHeader('Location', `${config.router.prefix}?swagger-ui=html`); | ||
| 30 | + res.setHeader('Location', `${config.router.prefix}/?swagger-ui=html`); | ||
| 31 | 31 | res.status(301).send(); | |
| 32 | 32 | }); | |
| 33 | 33 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments