In this video CJ shows how to deploy a hono API to several platforms including render.com, fly.io, vercel and cloudflare workers. He shows things you should consider for the typescript build settings and also shows how to connect to a sqlite db deployed to turso.
View the hono starter template here: https://github.com/w3cj/hono-open-api-starter View the deployment examples here: https://github.com/w3cj/hono-node-deployment-examples
See how to build this API here: https://www.youtube.com/watch?v=sNh9PoM9sUE
01:21 typescript build output
02:33 import extensions / aliases issue
03:35 tsc-alias setup
04:22 add start script to package.json
05:12 template with build settings
05:25 create turso db
06:53 add database env variables
07:49 drizzle-kit config / turso update
08:26 push schema to turso db
09:09 deploy to render.com
11:24 deploy to fly.io
14:41 deploy to vercel edge runtime
22:58 deploy to vercel node.js runtime
30:17 deploy to cloudflare workers
33:01 environment variable access updates
38:39 logger middleware updates
41:00 database connection updates
43:54 create runtime env
46:05 fixing wrangler specific errors
47:27 creating cloudflare .dev.vars
48:25 local dev with turso
51:25 deploy to cloudflare
53:14 Thanks!
tsc-alias | https://github.com/justkey007/tsc-alias turso | https://turso.tech/ render.com | https://render.com/ flyctl install | https://fly.io/docs/flyctl/install/ vercel runtimes | https://vercel.com/docs/functions/runtimes hono vercel example | https://hono.dev/docs/getting-started/vercel#_2-hello-world hono node.js vercel example | https://hono.dev/docs/getting-started/vercel#node-js cloudlfare wrangler | https://developers.cloudflare.com/workers/wrangler/install-and-update/ cloudflare secrets | https://developers.cloudflare.com/workers/configuration/secrets/#_top hono starter templates | https://github.com/honojs/starter/ hono bindings / variables | https://hono.dev/docs/api/hono#generics cloudflare secrets | https://developers.cloudflare.com/workers/configuration/secrets/ turso local development | https://docs.turso.tech/local-development cloudflare keep_vars | https://developers.cloudflare.com/workers/wrangler/configuration/#top-level-only-keys