Setup a Defer application
A Defer application is necessary to trigger background function executions from your application.
Setup a new application
First, sign-in to the Defer Dashboard:
On the create application form, make sure to install Defer on your GitHub account or organization so Defer can list your repositories.

Then, select the GitHub repository of your application:

Environment variables
The background functions that run in Defer might need to access some externally configured services or databases. For this reason, we recommend using the same environment variables configuration for your target API environment and Defer application:
Tips
Got a .env
file? Copy the content of the file into your clipboard and paste it into the first field of the "Add" line. ✨
Monorepo, Prisma
If your application resides in a monorepo or relies on Prisma, please refer to the Builds page on advanced options.

Once your application is properly configured, click the “Create” button.
Once redirected to the application, you should now get a Defer Token as follows:

Setup a new environment
Defer allows each application to have multiple environments.
Each environment is tied to a GitHub branch, making it easy to test new features before moving to production.
First, sign-in to the Defer Dashboard:
To create a new environment, go to the Defer Dashboard's home and, on an application card, open the actions menu:

You will land on the application form with the application's repository preselected:

Provide a valid branch name and environment name.
Environment variables
The background functions that run in Defer might need to access some externally configured services or databases. For this reason, we recommend using the same environment variables configuration for your target API environment and Defer application:
Tips
Got a .env
file? Copy the content of the file into your clipboard and paste it into the first field of the "Add" line. ✨
Monorepo, Prisma
If your application resides in a monorepo or relies on Prisma, please refer to the Builds page on advanced options.
Once your application is properly configured, click the “Create” button.
Once redirected to the application, you should now get a Defer Token as follows:
