Deploy to a live URL
deployDeploy a project to its live public URL at .apps.server4agent.com: the last step in putting a web page, site, app or API online. Checks that something in the project is listening on its listen_port, makes the project public, and checks its URL answers, then returns that URL with status live (or publishing, when it is public but has not answered yet). It builds and starts nothing: when nothing is listening it refuses and leaves the project as it was, so start the app first with start_app (after write_file, for code you write yourself), or have the on-server agent build and start it with start_build or prompt. Pass project_id; a server with exactly one project deploys that one without it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| server_id | Yes | The server's id, as returned by create_server or list_servers. | |
| project_id | No | The project to deploy. Optional when the server has exactly one project. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The project's public URL. | |
| name | No | Project name. | |
| note | No | What to do next, in a sentence. | |
| access | No | Who may open the URL. | |
| status | Yes | live = public and answering. publishing = public but not answering yet: deploy again shortly. | |
| project_id | Yes | The deployed project. | |
| visibility | No | Always public after a deploy. | |
| listen_port | No | The port the app listens on. | |
| published_now | No | Whether this call made the project public. false if it already was. |