Skip to content

redirect routes #797

Open
Open
@ghost

Description

What is the problem this feature would solve?

write less code

What is the feature you are proposing to solve the problem?

const app = new Elysia()
    .redirect('/', '/docs')
    
    // or
    .redirect({
        '/': '/docs',
        '/old-docs': '/docs'
    })

will be nice with serve.static (oven-sh/bun#13540)

What alternatives have you considered?

.get('/', ({ redirect }) => redirect('/docs'))

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions