GuidesUpdated

Run a website, API, and background worker in one workspace

Save each local process as a project command once, then start, check, and restart your website, API, and worker from one Canopy workspace.

On this page

A website can look ready while its API is down or its worker is idle. Save each process as a project command, start them in dependency order, and check behavior from page to logs. Canopy keeps those controls beside the agent; your project supplies the commands and runtimes.

Canopy project workspace with files and running services
Canopy project workspace with files and running services

List the processes before starting them

From the README, note each component's directory, runtime, install step, command, ready line, and port. Save each as a labeled Canopy component with the right working directory. Canopy shows configured services, detected URLs, and Preview. It runs your commands; it doesn't provide your database, cloud services, or runtime.

The downloadable sample gives you a reproducible start.
ComponentSample commandEvidence of startup
APInode api.mjsAPI ready at http://127.0.0.1:4175
Workernode worker.mjsA tick message after the API is ready
Websitenode website.mjsWebsite ready at http://127.0.0.1:4173

Start in dependency order and read the output

In the sample, start the API, then the worker and website. Open the URL the website prints, not one from yesterday. In the Servers panel, compare state, output, and ports with the saved command. If a process exits, read its first relevant error: a missing runtime, missing environment value, busy port, or failed API connection each needs a different fix. A Trigger.dev development worker is one more command; its runs and credentials stay in Trigger.dev.

Check the whole chain, not a green badge

The sample page shows a rising count while the worker posts to the API. Stop the worker and the count stops; restart it and the count resumes. Stopping the API resets the in-memory count. In a real app, use the feature and watch the website, API, and worker logs. A listening port proves a process bound an address, not that a user action works.

Recheck state when you return

Saved commands and restorable conversations don't mean services survived an app exit or sleep. On return, check each process, restart what's stopped, and recheck URLs. With two agent worktrees, confirm which checkout launched each server; they can still collide on ports or share a database. Write the startup order and safe config names in the README, never secrets.

Hand live evidence to the right agent

When a feature fails, send one agent the branch, page URL, action, visible result, and first relevant log line from the failing component. Ask for a diagnosis before edits. After a fix, restart affected components, repeat the action, and inspect the diff. The one-click sample guide is a full exercise; this guide is the pattern for your own project.

Copyable resources

Component run sheet

Fill this in once per website, API, worker, or local dependency.

Component: [website / API / worker]
Working directory: [path]
Runtime and version: [tool]
Install or setup step: [documented command]
Run command: [exact command]
Ready line and local URL: [expected output]
Depends on: [other components]
Port and checkout: [port / branch / worktree]
Behavior that proves it works: [observable action]
Where to inspect failure: [log / dashboard / browser request]
Secrets: [names and owner only; never values]

Frequently asked questions

Can Canopy run a Trigger.dev development worker?

Yes, as a configured project command, like a website or API command. It isn't a special hosted Trigger.dev integration.

Are old servers still running when I resume a project?

Check the Servers panel. Canopy remembers commands and sessions, but that doesn't mean yesterday's processes are still running.

More questions and answers →

Sources and further reading