🌍

Mount Points Demo

Select a locale to see the mount point feature in action

Mount Point Context

Values set by middleware via c.set()

/demo/mount-points
c.get() values:langId = undefinedcountryId = undefined

Switch Locale (Mount Point)

Each button adds the locale prefix at START of URL

app/kernel.tsx Configuration

Real mount points configuration powering this demo

typescript
// app/kernel.tsx - Mount point with locale prefix at START
@Kernel({
    controllers: controllers,
    mountPoint: {
        pattern: '/:langId/:countryId',
        middleware: async (c: Context, next: Next) => {
            c.set('langId', c.req.param('langId'))
            c.set('countryId', c.req.param('countryId'))
            return await next()
        },
    },
})
export class AppKernel {}

// Routes accessible at:
// /demo/mount-points → without locale context
// /fr/ca/demo/mount-points → WITH locale context ✅
📚 Read the Documentation