Get Started
Local Development & Testing
Prerequisites
Concepts: how Defer works
Ensure to be fluent with Defer’s Concepts before proceeding with this page.
Local Development
The good news is that Defer works locally by default; without a specific command.
How?
Locally, background functions run in the background leveraging the Promise API, providing a behavior similar to production environments, with some limitations.
Development Limitations
Defer relies on the Promise API to execute background functions locally; it means that all executions are bound to the parent process and will be canceled if the parent process (ex: local server) crashed or is stopped.
Given this limitation, the following @defer/client
APIs are supported locally:
delay()
: will result in executing the function immediatelydefer.cron()
: CRONs do not get scheduled locally
Troubleshooting
Was this page helpful?