Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(helper): introduce factory helper #1434

Merged
merged 2 commits into from
Sep 10, 2023
Merged

feat(helper): introduce factory helper #1434

merged 2 commits into from
Sep 10, 2023

Conversation

yusukebe
Copy link
Member

@yusukebe yusukebe commented Sep 10, 2023

This PR introduces factory helper. Now, this provides a middleware factory method to create a middleware handler.

const mw = (message: string) =>
  middleware(async (c, next) => {
    await next()
    c.header('X-Message', message)
  })

If define your middleware with middleware, the appropriate types will be added.

Author should do the followings, if applicable

  • Add tests
  • Run tests
  • yarn denoify to generate files for Deno

@yusukebe yusukebe merged commit e4c4322 into next Sep 10, 2023
10 checks passed
@yusukebe yusukebe deleted the feat/factory branch September 10, 2023 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant