/hono-remix-vite-on-cloudflare

hono remix vite on cloudflare ,use vite as local dev tools ,and can access cloudflare kv

Primary LanguageTypeScript

hono remix vite on cloudflare

In this project, I'm trying to mount the Remix application on Hono and run it on Vite on Cloudflare Pages Hono has a custom Vite dev server, so if you run your Hono application on it and import the Remix Virtual Module, it should work. thanks to Yusuke Wada

remix is so good framework for web development

when I use remix on cloudflare pages, remix on cloudflare pages it has some question for me.

  1. how to access assets ,such as favicon.ico ,css,js ,logo images
  2. when remix start use cloudflare stack like kv ,r2 ,d1 ,is must use wranger dev tools, remix vite:build && wranger dev pages
  3. how to use seesion
  4. how to use cloudflare api

and then I build this project and deploy to cloudflare pages

feature

  1. use remix on cloudflare pages
  2. use hono on cloudflare pages base on hono-and-remix-on-vite
  3. use vite when local development use cloudflareDevProxyVitePlugin
  4. use cloudflare stack like kv ,r2 ,d1 in both remix and hono
  5. use kv to store session

live video

https://youtu.be/kEHYDz-wuGY

Watch the video

Demo

https://hono-remix-vite-on-cloudflare.pages.dev/

Note

some issue

  1. pages is not support triggers cron, even if you add [triggers] in wranger.toml, it is not work

Author

jiangsi https://github.com/jiangsi

and welcome to subscribe my youtube channel https://youtube.com/@jiangsitech

License

MIT