Local CloudCode Development
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.
Setup
Node 8.10 or later is recommended for built-in async-await
support.
Install the journeyapps package with yarn
or npm
:
Usage
Here is a sample script:
BASE-URL and backend-deployment-id
The sample script above contains BASE-URL and backend-deployment-id
placeholders. Please see the Backend API section about HTTP Endpoints to get these values for your deployment.
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.
Batch API
When making a large number of database updates, it is strongly recommended to use the Batch API, to reduce the overhead per request.
Last updated