| Call | Does |
|---|---|
| create({ runtime, framework, label, slug }) | Creates a host and reserves its address. |
| list() | Every host of the account. |
| get(id) | One of them. |
| kinds() | Which kinds exist and which are available. |
| usage() | What the plan allows. |
| remove(id) | Deletes it. |
const site = await api.hosts.create({ runtime: "static", framework: "vite", label: "Portfolio" });
await site.deploy({ files: "./out" });
console.log(site.url, site.certificate);site = api.hosts.create(runtime="static", framework="vite", label="Portfolio")
site.deploy(files="./out")
print(site.url, site.certificate)The two runtimes that serve
| runtime | Frameworks | Deploys |
|---|---|---|
static | html, vite, react, vue, angular, astro, next-static | files |
edge | worker, hono | one code module |
Node, Express, Fastify, Nest and Next SSR need a persistent Node server, which Hosts does not provide. The SDK rejects them before files leave your machine.
It deploys, it does not build
An application is built where its code already is, and the result arrives here. Pointing a deploy at a source folder publishes sources — the deploy succeeds, which is what makes the mistake quiet.
The certificate is what makes you wait
On a level already covered it is immediate; on a fresh one it takes a couple of minutes, and until it is active the address refuses the connection. certificate says which — see Properties.
What is online counts against the object storage
There is no separate hosting allowance: the bytes are the account's, the same ones files and mailboxes use. usage() reports both.