Migrate frontend SSR from Express to Hono (+ Cloudflare Workers) - #1282
Open
halcycon wants to merge 2 commits into
Open
Migrate frontend SSR from Express to Hono (+ Cloudflare Workers)#1282halcycon wants to merge 2 commits into
halcycon wants to merge 2 commits into
Conversation
…port. Share a Web Standards Hono app between Node (@hono/node-server) and Workers so Docker keeps working while enabling edge deployment against an external Laravel API. Co-authored-by: Cursor <[email protected]>
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
Clarify /api URL shape, CLIENT vs SERVER env vars, and Laravel CORS/APP_FRONTEND_URL requirements for a remote API. Co-authored-by: Cursor <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
frontend/server.jswith a shared Hono SSR app so Docker/Node keeps working via@hono/node-serverentry.server.tsxfrom Express (render(Request)), dropscreateFetchRequest/@remix-run/node/cookie-parserworker.ts,wrangler.jsonc, Vite worker bundle) with Workers Assets for static files — Laravel API stays external (publicVITE_API_URL_SERVER)Closes / relates to #1053
Test plan
cd frontend && yarn installyarn build && yarn start— SSR HTML fills placeholders;/robots.txtis dynamic; static assets (e.g./favicon.ico) still 200yarn dev:ssr— Vite middleware + Hono still works in development.dev.vars.example→.dev.varswith a public API URL;yarn build:worker && yarn deploy:cf --dry-run(orwrangler deploy --dry-run) succeedsyarn dev:cfagainst a reachable Laravel API and confirm a public page SSRsMade with Cursor