Local CloudCode Development
Last updated
Last updated
The same database API from CloudCode is available in NodeJS for local development. This may be useful for debugging, or long-running tasks that would exceed the memory or time limits of CloudCode, such as large migration tasks.
Node 8.10 or later is recommended for built-in async-await
support.
Install the package with yarn
or npm
:
Here is a sample script:
Run the following from your terminal:
Limitations
Some CloudCode-specific functionality, such as task context, automatic DB
configuration and scheduling tasks, is not available yet. This may be added in future versions.
Only v4 apps are supported. V3 apps must be upgraded to v4 before using this package.
The sample script above contains BASE-URL and backend-deployment-id
placeholders. Please see the Backend API section about to get these values for your deployment.
When making a large number of database updates, it is strongly recommended to use the , to reduce the overhead per request.