In express I serve folder to a path like this
app.use("/v/", express.static(process.env.DOWNLOADS));
In oak I try to do like this but it does not work, the route does not even get hit at all
router.get("/v/", async ctx => {
await ctx.send({
root: process.env.MEDIA_DIR
});
});
If I put "/v/*" I get error: Uncaught (in promise) TypeError: Unexpected MODIFIER at 3, expected END so it seems glob * is not supported.
It seems the only thing I can do is /v/:uselessparam but then it will not match path like /v/foo/bar.
Is there seriously no way to make a route like /foo/ that matches all paths underneath like /foo/bar and /foo/bar/baz?????
In express I serve folder to a path like this
In oak I try to do like this but it does not work, the route does not even get hit at all
If I put
"/v/*"I geterror: Uncaught (in promise) TypeError: Unexpected MODIFIER at 3, expected ENDso it seems glob*is not supported.It seems the only thing I can do is
/v/:uselessparambut then it will not match path like/v/foo/bar.Is there seriously no way to make a route like
/foo/that matches all paths underneath like/foo/barand/foo/bar/baz?????