if a define a route like this:
router.get('/:name/:age', async (ctx, next) => {
ctx.body = ctx.params
})
when i access the url: http://localhost:3000/vortesnail/18
, I'll get:
{
name: 'vortesnail',
age: '18'
}
Here is my problem: if i access these urls, i want to get all params, what should i do with the router.get('/name/age/????????', async () => {})
?
Example:
http://localhost:3000/vortesnail/18/male
http://localhost:3000/vortesnail/18/male/student
http://localhost:3000/vortesnail/18/female
http://localhost:3000/vortesnail/18/female/student/any/any/any/....