Coming back to polka after a few years I have problems mounting sub-apps which was easy to do in koa.
I'd like to have these URLs:
/app/:appid/client/:clientid
where a middleware extracts the proper req.app from the appid and another middleware extracts req.client from clientid
My sub-apps I structured like this:
const client = polka()
.use(req, res, next) => {
req.client = getClient(req.params.clientid)
next()
})
.get("/", ...)
const app = polka()
.use((req, res, next) => {
req.app = getApp(req.params.appid)
next()
})
.get("/", ...)
.use("client", client)
but the URL mentioned about does end up in 404.
btw: do you want to enable "Discussions" here so we don't use issues for simple Q&A?
Coming back to polka after a few years I have problems mounting sub-apps which was easy to do in koa.
I'd like to have these URLs:
/app/:appid/client/:clientidwhere a middleware extracts the proper
req.appfrom theappidand another middleware extractsreq.clientfromclientidMy sub-apps I structured like this:
but the URL mentioned about does end up in 404.
btw: do you want to enable "Discussions" here so we don't use issues for simple Q&A?