https://github.com/rphlmr/react-router-hono-server
This is a demo of remix-hono with Vite.
It uses Hono Vite dev server with HTTPS
📖 See the Remix docs and the Remix Vite docs for details on supported features.
npx create-remix@latest --template rphlmr/remix-hono-vite
- On the local dev, you rely on Hono Vite dev server
- With HTTPS self signed certificate
- When building,
server/build.ts
bundlesserver/index.ts
andserver/middlewares.ts
tobuild/server/index.js
- If you deploy with Docker, it should be as easy as just copying the
build
folder andnode_modules
.
- If you deploy with Docker, it should be as easy as just copying the
Copy .env.example
to .env
and fill the variables. (it is loaded by Remix for you, see this PR)
Run the Hono server with Hono Vite dev server:
npm run dev
First, build your app for production:
npm run build
Then run the app in production mode:
npm start
Now you'll need to pick a host to deploy it to. (works great on https://fly.io)
If you're familiar with deploying Hono applications you should be right at home. Just make sure to deploy the output of npm run build
build/server
build/client