AirBuild services

Watch a service's live logs, read its deployment history, deploy a new version yourself and save the deployed source, from the Hosting tab.

Your Agents deploy your app’s backend to AirHost as one or more services. The Hosting tab in the Project lists them. This page is about checking on a service: what it’s doing right now, when it last changed, and how to put up a new version yourself. To open the tab, see Host your app’s backend, database and sign-in (AirHost).

Anyone in the Team can do everything on this page, not only the Team’s owner.

Find the service

At the top of Hosting are four numbers: Services, Live, Last Deployed (with the service’s name under it) and With Database. Under them is one row per service, with its address and how long ago it was last deployed.

A service is counted as Live, and its dot lights up, once it has a deployment. That doesn’t tell you whether it’s answering requests right now. To check, tap its address to open it in a new tab, or watch its live logs.

Tap a row to open the service’s page. Touch and hold a row (on the Mac, right-click it) for a shorter menu.

To On the service’s page In the row’s menu
Open the service Tap the Address Open in New Tab
Watch its requests Live Logs Live Logs
Put up a new version Deploy New Version… (Mac only) Deploy New Version…
See every deployment Deployment History —
Save the deployed source Export Source… —
Copy its address Copy Address Copy Address

On iPhone and iPad, pull down on the tab to read it again. If the list can’t load, the numbers show “—” and the list says why, with Try Again.

Watch what the service does right now

  1. On the service’s page, tap Live Logs. Or touch and hold the service’s row (on the Mac, right-click it) and choose Live Logs.
  2. Wait for the badge at the top to say Live. Until a request comes in, the page says “Waiting for the service to handle a request…”.
  3. Use your app, or open the service’s address, so the service handles a request. Each request appears at the top of the list, newest first.

On iPhone, Live Logs opens as the next page. On the Mac and iPad, the service’s page closes and Live Logs opens in its place.

Each request is one entry:

Part What it tells you
A word such as ok or exception How the request ended. A check mark means it finished; a stop sign means it didn’t.
The time When the request ran, to the second.
Lines tagged DEBUG, INFO, WARN or ERROR What the service printed while it handled the request. An error the service threw shows as an ERROR line with the error’s name and message.
“Some lines were left out of this entry.” Not everything the request printed came through.

You can select the text of a line to copy it, for example to paste an error into the Project’s chat.

Turn on Errors Only to keep only the requests that didn’t finish or printed an ERROR line. If there are none yet, the page says “No errors so far.”

The badge

Badge What it means What to do
Connecting The page is opening the connection. Wait.
Live New requests appear as they happen. —
Disconnected The connection ended. Tap Reconnect. The entries already on the page stay.
Unavailable The logs couldn’t be opened. The reason shows under the badge. Tap Try Again.

Logs are live only

The page says: “Logs are live only. Opening them somewhere else replaces this connection.” That means:

  • You only see requests from the moment the page connects. Nothing from before is shown, and what you saw is gone once you close the page. So open Live Logs first, then do the thing that goes wrong.
  • Only the newest entries stay on the page. Older ones drop off as new ones arrive.
  • One place at a time shows a service’s live logs. If you open the same service’s logs in another window or on another device, this page says Disconnected.

Your Agents read the same logs with workers logs. See workers.

Read the deployment history

  1. Open the service’s page.
  2. Tap Deployment History.

Each deployment is one row, newest first. It shows the date and time, how many files and how large it was, and the last characters of its ID. The newest one is marked Current: it’s the one the service is running. If the service was never deployed, the page says “No deployments yet.”

Deployment History only lists deployments. It can’t switch the service back to an earlier one. To go back, deploy the earlier version again (see the next section), or ask your Agents in the Project’s chat.

Deploy a new version yourself

Your Agents deploy when they change the backend. You can also upload a new version of a service yourself, from a .tar.gz archive of its source.

In Hosting, touch and hold the service’s row and tap Deploy New Version…. The same works on iPad.

The Update Service sheet opens.

  1. Name shows the service’s name. It can’t be changed here.
  2. Database starts at the database the service uses now, or None. To connect the service to another database, pick it. The sheet says: “Selecting a database connects this service to it.”
  3. Tap Choose Archive… and pick the archive: a .tar.gz service archive of up to 10 MB. Archive changes from Not Selected to the file’s name.
  4. Tap Deploy.

Deploy stays off until an archive is chosen. While the archive uploads, Deploy turns into a spinner. When it’s done, the sheet closes and the new deployment is Current in Deployment History.

If the deploy fails, the sheet shows why. Try Again there opens the file picker so you can choose another archive. If the archive was fine and the problem has passed, tap Deploy again. If the archive itself is refused, see Host your app’s backend, database and sign-in (AirHost).

To deploy a service that doesn’t exist yet, use Deploy on the Mac: see Host your app’s backend, database and sign-in (AirHost).

Save the deployed source

  1. Open the service’s page.
  2. Tap Export Source…. The row says “Downloading…” until the archive has arrived.
  3. Choose where to save it. The file is named after the service, ending in .tar.gz.

The archive holds the source of the service’s current deployment.

Questions

The service says Live, but my app gets no answer
Live only means the service has a deployment. Open Live Logs, then make the request again from your app. If an entry ends in something other than ok, or shows ERROR lines, copy them into the Project’s chat for your Agents. If no entry appears at all, the request isn’t reaching this service: check the address your app uses against Copy Address.
Can I see yesterday's logs?
No. Logs are live only. Keep Live Logs open while you repeat what went wrong.
Live Logs keeps saying Disconnected
The connection ended, or the same service’s logs were opened somewhere else. Close them there, then tap Reconnect here.
Deployment History shows an error instead of the list
The history couldn’t load. The page says why. Tap Try Again.
How do I go back to an earlier version?
The app can’t switch back from Deployment History. Deploy the earlier archive again with Deploy New Version…, or ask your Agents to deploy the earlier version.
Why don't I see Deploy on the Mac?
Deploy, for a new service, appears in the inspector’s bar under the Hosting tab once the tab lists at least one service. While the tab is still empty, ask your Agents to add AirHost (see Host your app’s backend, database and sign-in (AirHost)). On iPhone and iPad there’s no Deploy; use Deploy New Version… from a service’s row.