Go live with CLI
Go live deploys everything in apitogo.config.json to APItoGo: the portal, the gateway, sign-in
and plans.
Before you deploy
-
Sign in to APItoGo once on this computer:
CodeIn CI, set
APITOGO_API_KEY_IDandAPITOGO_API_SECRET(an API key from the dashboard) instead. -
Check the config:
Code
Deploy
Code
On the first run, deploy creates the project: it asks for the hosting plan (Free, Starter or
Professional) and writes the project's id into apitogo.config.json. Starter and Professional
open the platform's checkout. To create the project without deploying, run
apitogo project create --plan <plan>.
Then it sets up each service and prints what it did:
Code
A step whose input has not changed since the last deploy is skipped. --force runs it anyway.
Secrets deploy asks for
Deploy asks, hidden, for the secrets the config needs and stores them as project secrets:
| When | It asks for |
|---|---|
plans.json has a plan with a price | Your Stripe secret key, then the webhook signing secret |
identity.connections has a provider | That provider's client secret, under the name the config gives |
Set up Stripe for paid plans shows where the Stripe values are. Set or
change a secret yourself with apitogo secrets set <NAME>, and list them with
apitogo secrets list.
Selling paid plans and using a custom domain need Starter or Professional. On Free, deploy stops at a paid plan and says so.
One service at a time
Code
--only takes portal, gateway, identity and plans.
Other flags
| Flag | Purpose |
|---|---|
--force | Redeploy even when nothing changed |
--yes | Confirm a change that cannot be undone, such as another sign-in provider |
--verbose | Show the build log and every platform step |
--json | Print the result as JSON only |
--project-id | Deploy to this project for this run only |
To move the folder to another project for good, use apitogo project use <id> (see
Commands).
After deploy
Code
Your plans and APItoGo's
| Kind | What it is | Where |
|---|---|---|
| Hosting plan | What you pay APItoGo: Free, Starter, Professional | Chosen on the first deploy or project create --plan |
| Your plans | What your users pay you for your API | apitogo/plans.json (Plans) |