Skip to content

Migrate frontend SSR from Express to Hono (+ Cloudflare Workers) - #1282

Open
halcycon wants to merge 2 commits into
HiEventsDev:developfrom
halcycon:feature/hono-ssr-cloudflare-workers
Open

Migrate frontend SSR from Express to Hono (+ Cloudflare Workers)#1282
halcycon wants to merge 2 commits into
HiEventsDev:developfrom
halcycon:feature/hono-ssr-cloudflare-workers

Conversation

@halcycon

@halcycon halcycon commented Jul 27, 2026

Copy link
Copy Markdown

Summary

  • Replaces Express in frontend/server.js with a shared Hono SSR app so Docker/Node keeps working via @hono/node-server
  • Decouples entry.server.tsx from Express (render(Request)), drops createFetchRequest / @remix-run/node / cookie-parser
  • Adds Cloudflare Workers entry (worker.ts, wrangler.jsonc, Vite worker bundle) with Workers Assets for static files — Laravel API stays external (public VITE_API_URL_SERVER)

Closes / relates to #1053

Test plan

  • cd frontend && yarn install
  • yarn build && yarn start — SSR HTML fills placeholders; /robots.txt is dynamic; static assets (e.g. /favicon.ico) still 200
  • yarn dev:ssr — Vite middleware + Hono still works in development
  • Copy .dev.vars.example.dev.vars with a public API URL; yarn build:worker && yarn deploy:cf --dry-run (or wrangler deploy --dry-run) succeeds
  • Optional: yarn dev:cf against a reachable Laravel API and confirm a public page SSRs

Made with Cursor

…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]>
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@halcycon

Copy link
Copy Markdown
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]>
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