Skip to content

Commit

Permalink
Update koa-router and fix wildcard routes
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Marr <git@stefan-marr.de>
  • Loading branch information
smarr committed Oct 1, 2024
1 parent f8ae83c commit 54cef16
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 23 deletions.
31 changes: 12 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"join-images": "1.1.5",
"koa": "2.15.3",
"koa-body": "6.0.1",
"koa-router": "12.0.1",
"koa-router": "13.0.1",
"pg": "8.13.0",
"promisify-child-process": "4.1.2",
"sharp": "0.33.5",
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ router.post(
);

if (DEV) {
router.get(`${siteConfig.staticUrl}/:filename*`, serveStaticResource);
router.get(`/shared/:filename*`, serveStaticSharedResource);
router.get(`/src/frontend/:filename*`, serveViewJs);
router.get(`${siteConfig.staticUrl}/*filename`, serveStaticResource);
router.get(`/shared/*filename`, serveStaticSharedResource);
router.get(`/src/frontend/*filename`, serveViewJs);
router.get(
`${siteConfig.reportsUrl}/:change/figure-html/:filename`,
serveReport
Expand Down

0 comments on commit 54cef16

Please sign in to comment.