Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

multiple sub-apps cannot mount on the same root #14

@v1rtl

Description

@v1rtl
import { App } from 'https://denopkg.com/deno-libs/tinyhttp@master/mod.ts'
import { makeFetch } from 'https://deno.land/x/superfetch@1.0.4/mod.ts'

const app = new App()

const route1 = new App()
route1.get('/route1', (_req, res) => void res.end('route1'))

const route2 = new App()
route2.get('/route2', (_req, res) => void res.end('route2'))

app.use(route1)
app.use(route2)

const res1 = await makeFetch(app.handler)('/route1')
res1.expect('route1')

const res2 = await makeFetch(app.handler)('/route2')
res2.expect('route2')

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions