Resources
Deploy an app built with Claude Code
To deploy an app Claude Code built, fix the handful of things generated apps get wrong, give the agent a Stackap token and a short prompt, and review the build log, the health check and the address it reports.
Before the agent starts: what generated apps get wrong
An app that runs on a laptop is not yet an app that runs in a container. Agents tend to leave the same few gaps, and each one fails a deploy in a recognizable way. Check these in the repository before you hand anything over.
- A hard-coded port. The app must listen on the port in the
PORTenvironment variable. A fixed3000that works locally will fail the health check. - No
startscript. A Node app needs one inpackage.json. Next.js apps needbuildandstart. - A missing or stale lockfile. Stackap picks npm, yarn or pnpm from the lockfile. A lockfile that no longer matches
package.jsonfails the install. - Secrets in the repository. A committed
.envfile is the usual cause. Keep real values out of git and set them as environment variables on the project instead. - Browser variables without the prefix. In Next.js, anything the browser needs must start with
NEXT_PUBLIC_. Everything else is a placeholder while the image builds.
What you give the agent
Three things: your Stackap token, the project name you want, and the prompt on the get started page. Hand the token over when the agent asks, and never paste it into a file in the repository. The prompt already tells the agent to pass secrets on standard input, to read the build log before changing code, and to stop and ask you before deleting anything or pointing a production domain.
What the agent runs
$ stackap login --url https://api.stackap.com --token-stdin $ stackap create my-app --name "My App" $ stackap env set my-app DATABASE_URL --stdin $ stackap deploy my-app $ stackap logs my-app --source build
A failed build or an unhealthy container never receives traffic, so a first attempt that goes wrong leaves nothing broken in front of visitors. The agent reads the build log first, then the runtime log if the build passed but the app did not start.
What you review afterwards
- The address the agent reports opens, over HTTPS, and shows the app.
- The build log shows what Stackap detected, and it matches what you built.
- No secret appears in the log output or in the repository diff.
- Any domain change was made by you or approved by you, since it needs a DNS record at your provider.
Make the next deploy repeatable
Add a short note to your repository's CLAUDE.md so every later session deploys the same way. Something like: this project deploys with stackap deploy my-app; never put secrets on a command line; read build and runtime logs before editing code; ask before deleting or attaching a domain. A note like this means you give the instruction once, not every session.
Questions
Does it have to be Claude Code?
Have you tested this with Claude Code specifically?
Stackap is in early access. Tell us what you run and we will reply with a straight answer about whether it fits.
Ask for an invitationLast updated .