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 link
to bring in relevant information from your Zuplo account and project. Follow the prompt to select the right environment. For local development, we recommend selecting the development 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.zuplo 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.