Local Development
Connecting to Zuplo Services Locally
To use Zuplo services such as API keys and rate limiting locally, you must have a Zuplo account and an existing project. You will be using the connections from your remote gateway.
- Run
npx zup login
to log into your account in your browser. - Run
npx zup link
to bring in relevant information from your Zuplo account and project. Follow the prompt to select the right environment. - At this point, you will see a file called
.env.zuplo
containing some information about the account, project, and environment that your local gateway is linked to.
Caution
As the .env.zuplo file could contain sensitive information, it should not be committed to your version system. Consider adding .env to your .gitignore file.
- You can run
npm run dev
as normal. The Zuplo CLI will automatically pick up the relevant services from the.env.zuplo
file. - If you want to switch environments (e.g., from development to preview), run
npx zup link
again and select the new environment. You can see which environment you are connected to by looking at the .env.zuplo file.
# This file is auto-generated from zup link. Please do not edit it manually. # It will be auto-generated afresh the next time you run zup link. # If you wish to add your own environment variables, create a separate .env file. ZUPLO_ACCOUNT_NAME=your-account-name ZUPLO_PROJECT_NAME=your-project-name ZUPLO_ENVIRONMENT_TYPE=your-environment