page:recipes:mobile backend:hono:persistent state

Host mobile backend with Hono: Postgres-backed state

Deploy a mobile backend built with Hono on Ample using the durable job state pattern. Compute runs the app in an isolated microVM behind a public HTTPS URL, a managed PostgreSQL 16 database is auto-provisioned and injected as DATABASE_URL. Verified on Hono: a jobs table with a state and attempts counter, processing inside a row-locked transaction, and a second run that is a no-op (job=done attempts=1 idempotent=true). Not separately tested: your job types, payload schema and retry policy; treat the mobile backend-specific behavior as your application code.

Representative Queries

Resource Requirements

Input Schema

Workflow Steps

  1. Build and start: npm install and npm run start with @hono/node-server on the node-22 template. The server must bind 0.0.0.0 on PORT.
  2. Implement the pattern on PostgreSQL: The fixture's module implements durable job state.
  3. Deploy: Run the synchronous deploy once and read the result.
  4. Verify: Fetch the live URL and the pattern self-test route(s) and run your own checks.

Limitations

Cost Estimate

Success Checks

  1. App responds on its public URL.
  2. Durable-job-state self-test passed.

Examples