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: honoEnhancer for Vercel, Deno and Netlify #941

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

rmarscher
Copy link
Contributor

Follow up to #923. I need to test these three but should be able to...

Copy link

vercel bot commented Oct 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
waku ✅ Ready (Inspect) Visit Preview Nov 12, 2024 1:27pm

Copy link

codesandbox-ci bot commented Oct 4, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@rmarscher
Copy link
Contributor Author

I confirmed Deno works. https://rm-waku-project-93w03wnv4zvw.deno.dev/api/hello

My /about page has a few additions including printing the accept header pulled from the Hono context. https://rm-waku-project-93w03wnv4zvw.deno.dev/about Ignore the 404 error, that was part of a cloudflare test.

I also deployed the cookies example without issue -
https://rm-waku-cookies-example-bkjhc9rcc5e1.deno.dev/

deployctl deploy --project rm-waku-cookies-example --include ./dist --include ./private --entrypoint dist/serve-deno.js

Just need to test Netlify and Vercel now...

@rmarscher
Copy link
Contributor Author

I forgot about this PR 😬 I never tested with Vercel and Netlify...

@rmarscher
Copy link
Contributor Author

Netlify works with the hono context - https://67335aaff9d5e608f01f7f2f--waku-project.netlify.app/about

@rmarscher
Copy link
Contributor Author

And Vercel works - https://waku-project2-34ob07khi-rob-marschers-projects.vercel.app/about

OK. This PR is ready to merge.

@rmarscher rmarscher marked this pull request as ready for review November 12, 2024 13:44
Copy link
Owner

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for your contribution!


const honoEnhancer =
(await configPromise).unstable_honoEnhancer || ((createApp) => createApp);
const app = honoEnhancer(createApp)(new Hono());
Copy link
Owner

Choose a reason for hiding this comment

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

Maybe we can do the same for vite-plugin-deploy-cloudflare.ts using top-level await.

@dai-shi dai-shi merged commit de10916 into dai-shi:main Nov 13, 2024
26 checks passed
@dai-shi dai-shi mentioned this pull request Nov 13, 2024
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.

2 participants