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

replace setup with hooks #670

Merged
merged 10 commits into from
Mar 25, 2021
Merged

replace setup with hooks #670

merged 10 commits into from
Mar 25, 2021

Conversation

Rich-Harris
Copy link
Member

#334 (comment). Working on docs

@vercel
Copy link

vercel bot commented Mar 25, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/sveltejs/kit/ELQfFiuwdCgvBn4tYpRAoEaRP2gj
✅ Preview: https://kit-git-gh-334-sveltejs1.vercel.app

@Rich-Harris
Copy link
Member Author

The docs explain the changes: 04-hooks.md.

This should give us all the flexibility we need to create new endpoints programmatically (e.g. for auth), modify request/response headers, modify bodies, add custom logging, and so on. It should also be possible to use existing connect middleware via a compatibility layer, which is left as an exercise to the reader.

Copy link
Member

@Conduitry Conduitry left a comment

Choose a reason for hiding this comment

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

This looks like a good API, and sorry for all the sarcastic things I was saying about it in chat yesterday

packages/kit/src/core/utils.js Show resolved Hide resolved
packages/kit/src/runtime/server/index.js Outdated Show resolved Hide resolved
documentation/docs/04-hooks.md Show resolved Hide resolved
documentation/migrating/03-project-files.md Show resolved Hide resolved
@Rich-Harris
Copy link
Member Author

sorry for all the sarcastic things I was saying

i would hope for nothing less

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.

4 participants