FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Updated appPrefix (added slash suffix) · lambda-lambda-lambda/cli@762b589 · GitHub

Commit 762b589

Browse files
committed
Updated appPrefix (added slash suffix)
Updated comments / Added Swagger link
1 parent b283cda commit 762b589

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎templates/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
## Running your app
1616

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`)
1818

1919
## Deploying to AWS
2020

‎templates/app-async.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ exports.handler = async (event, context, callback) => {
1818
const router = new Router(request, response);
1919
router.setPrefix(config.router.prefix);
2020

21-
// Middleware (order is important).
21+
// Middleware (in execution order).
2222
router.use(accessControlHeaders);
2323
router.use(appConfigPlugin(config));
2424
router.use(swaggerUIViewer(swaggerJson));
2525

26-
// Send root response.
26+
// Send root response ({{appPrefix}}/)
2727
router.get('/', function(req, res) {
2828

2929
// Redirect to Swagger viewer.
30-
res.setHeader('Location', `${config.router.prefix}?swagger-ui=html`);
30+
res.setHeader('Location', `${config.router.prefix}/?swagger-ui=html`);
3131
res.status(301).send();
3232
});
3333

‎templates/app.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ exports.handler = (event, context, callback) => {
1818
const router = new Router(request, response);
1919
router.setPrefix(config.router.prefix);
2020

21-
// Middleware (order is important).
21+
// Middleware (in execution order).
2222
router.use(accessControlHeaders);
2323
router.use(appConfigPlugin(config));
2424
router.use(swaggerUIViewer(swaggerJson));
2525

26-
// Send root response.
26+
// Send root response ({{appPrefix}}/)
2727
router.get('/', function(req, res) {
2828

2929
// Redirect to Swagger viewer.
30-
res.setHeader('Location', `${config.router.prefix}?swagger-ui=html`);
30+
res.setHeader('Location', `${config.router.prefix}/?swagger-ui=html`);
3131
res.status(301).send();
3232
});
3333

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL