---
topic: two-apps
connector: "deploy_app, once per app"
api: "POST https://ship.embarko.ai/apps, once per app"
requires: [deploy]
---

[← Guide home](https://embarko.ai/docs)

# Frontend and backend

**On this page:** Steps, Limits, What to tell the person

> Plain words unless the person is a developer. Never invent a link, name or code. [Rules](https://embarko.ai/docs/prerequisites) Needs first: [deploy](https://embarko.ai/docs/deploy).

A frontend and a backend are two apps with two addresses. Deploy the backend first, then point the frontend at its address.

**Connector:** deploy_app, once per app

**Done when:** A feature on the frontend that calls the backend works at the frontend's link.

**Steps**

1. Package each part from its own folder (the one with its manifest), never the repo root. Give them related names, such as acme-api and acme-web.
2. Deploy the backend first. Wait until it is live; its address is https://acme-api.embarko.app.
3. In the frontend, set the backend address in the code or a committed config file (for example src/config.js). .env files are left out of the upload, so a VITE_ value in .env.production will not reach the build.
4. In the backend, allow the frontend's address in CORS: https://acme-web.embarko.app (and a custom domain if you add one later).
5. Deploy the frontend, then open it and use a feature that calls the backend.
6. Secrets (API keys) go on the backend as env vars; over HTTP that needs the backend claimed first (see claim).

**Limits**

- Two apps count as two apps on the person's plan.
- The apps cannot share files: only HTTP between them.

**What to tell the person**

- done: "Your app is live: https://acme-web.embarko.app."

**Next:** Deploy the backend, then the frontend.

**Related:** [env-vars](https://embarko.ai/docs/env-vars) · [custom-domain](https://embarko.ai/docs/custom-domain)

---

[Guide home](https://embarko.ai/docs) · JSON: add .json