Skip to content

Bun.serve routes bug #20965

@vamsaya

Description

@vamsaya

What version of Bun is running?

No response

What platform is your computer?

windows11 24h2

What steps can reproduce the bug?

oha -z5s http://127.0.0.1:3000/demo.css

Bun.serve({
    routes: {
        "/demo.css":Bun.file("demo.css"),
        "/demo.css":new Response(Bun.file("demo.css")),
    }
})
Image
Bun.serve({
    routes: {
        "/demo.css": {
            GET() {
                return new Response(Bun.file("demo.css"))
            }
        }
    }
})
Image

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbun:serveBun.serve and HTTP server

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions