-
-
Notifications
You must be signed in to change notification settings - Fork 173
Open
Description
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?
anonimusprogramus, Valexr and osvein
Metadata
Metadata
Assignees
Labels
No labels