How your app runs
What your app runs on, where its data lives, and who can reach it.
Hosting#
- Every app runs on Cloudflare’s network as a Worker, on its own address under stackly-site.app.
- Each request has limits: 30 seconds of CPU time and 100 calls to the database, storage and outside services. Over the CPU time, the request is stopped.
- Apps answer requests. They do not run in the background between requests, and they cannot keep open servers or run scheduled jobs yet.
- Stackly calls the app’s health check before a release goes live.
Database and file storage#
- Each app gets its own SQL database (
APP_DATABASE, Cloudflare D1) and its own file storage (APP_STORAGE, Cloudflare R2). - The draft and live each have their own copy. Nothing in the draft touches live data.
- No app can read another app’s data.
- The Data tab shows the tables, rows, relations and migrations.
Visibility and search#
- A private app answers only you. A public app answers anyone with the link.
- Search engines may index a public app, unless you mark it as a tool in the SEO tab. A private app or a tool is always kept out of search.
- Pick the app’s subdomain under stackly-site.app in Settings. A custom domain can be saved there too, but connecting it (DNS and certificates) is not available yet.
Traffic and logs#
- Traffic counts page views and visits, using an anonymous visitor cookie. See Cookies and storage.
- Traffic also counts events: actions you name, like a finished sign-up or a placed order. The app sends one with
track('order_placed')fromsrc/lib/track.ts, which posts to/__stackly/eventon the app’s own address. Stackly tracks the key actions when it builds them, and the Traffic tab can ask it to add more. - The Logs tab has three logs. Build is the latest draft build’s output. Draft and Live show what the draft and the published app print with console.log or console.error, and each request that failed or changed data. Successful page loads are left out: Traffic counts those.
- Logs are kept for 14 days. Each app can write 300 lines a minute; past that, one line says how many were not kept. stackly logs reads the build and draft logs from the terminal.
- Usage shows what running the app costs.
More#
Keys and outside services: Secrets and outside services. All the numbers: Limits.