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

Add toWebHandlerLayer to loaders/actions #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stevebluck
Copy link

@stevebluck stevebluck commented May 15, 2024

I'm not quite sure that this is correct so let me know if I messed up somewhere and I'll do my best to correct it.

  • Adds toWebHandlerLayer to action and loader
  • Adds graceful shutdown on SIGTERM and SIGINT events

A couple of extras (happy to revert if you don't like them)

  • Renames makeServerContext -> makeRequestContext
  • Infers RequestEnv from makeRequestContext

Also it looks like my code formatting had a field day. Might be worth getting prettier or some other formatter configured.

) => {
const webHandler = effect.pipe(
Effect.map((response) =>
HttpServer.app.toWebHandlerLayer(response, AppLayer)
Copy link
Author

@stevebluck stevebluck May 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shame there is no dual api for this.

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.

1 participant