Deploy and operate Hono
Model runtime bindings
Type and inject databases, secrets, caches, and environment configuration according to the target runtime.
9 minute lesson
Before choosing a tool or writing more code, make the requirement concrete. The Worker receives a database binding through env, while the Node adapter injects a repository built from process configuration.
Bindings are capabilities supplied by the deployment environment and should remain visible in application types and tests. The useful target is not encyclopedic coverage. Make one deliberate choice, observe its consequences, and know which requirement would make you revise it.
A common failure is to read undeclared globals deep inside handlers. The happy path may still work, which makes the mistake easy to miss. define a small environment contract, type it, validate local equivalents, and replace it with fakes in tests. Keep the first version small enough that every important input and output remains visible.
This supports the module goal: Deploy the same core app to two runtimes while documenting real differences instead of claiming magical portability. Capture the request, command, trace, screenshot, test result, or other evidence that proves the result.
Run the app with a missing binding and make startup or request failure explicit and testable. Change one condition on purpose, predict the result, and compare the prediction with what actually happened.
Lesson completed