Skip to content

Server listen hook #16979

Description

@MoritzLoewenstein

Describe the problem

I want to register webhooks on application start, but the webhook creation request requires response to a PING request. The init hook fires before http server start (adapter-node), so sveltekit can not answer the request yet and the webhook creation fails.

Describe the proposed solution

I would like to see a listen hook (hook.server.js) that fires as soon as SvelteKit is ready to receive requests.

Alternatives considered

I am currently using the init hook with a setTimeout.

Importance

would make my life easier

Additional Information

Not sure how this would work on serverless / edge platforms, but I think this would be very useful on standalone runtimes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions