Deploy and dashboard

One command to ship, one page to watch it.

2 MIN READView Markdown ↗
Terminal
bunx arkapi deploy

The first deploy creates the app and writes its id to arkapi.config.ts. Each deploy bundles the backend, uploads it and regenerates the client with the hosted URL. The host starts the new version next to the old one and switches traffic only when it answers. Open connections move over; a version that fails to start changes nothing.

Build and install the app after a deploy that changed signatures: the URL and types are compiled into the client. An app built against an older backend still works for calls that match; others fail with a message that says to rebuild, and responses carry X-ArkAPI-Stale: 1.

Dashboard#

bunx arkapi open opens the app's page:

  • requests and errors per minute, for the last hour;
  • endpoints with call counts and timings;
  • Recent errors, with endpoint, code and message;
  • Data: a read-only view of the tables in app.db;
  • Logs: everything the backend writes to the console (also bunx arkapi logs -f);
  • deployed versions with Roll back;
  • environment variables (also bunx arkapi env set KEY=value);
  • CPU, memory, disk and file usage against the limits.

Local development#

bunx arkapi watch runs the backend on your machine and points the client at it. It regenerates the client and restarts when you save an api file. The emulator reaches it at 10.0.2.2; for a phone on your network, set deviceHost in arkapi.config.ts. Run deploy again before building an app for the hosted backend.

Tab to navigate results · Enter to open · Esc to close