Virtua Parse eXtender or VPX is a free and open source extension for Parse providing, for now:
- A customisable log for all operations done on Parse entities (create, update and delete) ;
- A possibility to run a custom cloud code from Parse API or Parse Dashboard ;
- VPX allow users to reload its configuration through Parse API and Parse Dashboard.
- Copy file
cloud/virtua-parse-extended.js
to yourParse Cloud
folder (default is./cloud
) - Add following lines to your
./cloud/main.js
file:const vpx = require('./virtua-parse-extended'); vpx.init();
- Restart your Parse server.
Note : VPX requires at least [email protected]
to work properly, but it has been made compatible in a degraded mode for older versions.
VPX will monitor every modification made on user Parse entities and log them in the class VpxEntityOperationLog
:
Field | Type | Description |
---|---|---|
createdAt |
Date |
Date of the event |
operation |
String |
Operation executed, can be: created , updated or deleted |
targetClass |
String |
Class name of the entity modified |
targetId |
String |
Parse ID of the entity modified |
Note: by default, VPX will monitor create, update and delete operations. If a new class is added, VPX configuration must be reloaded with job vpx-reload
or by restarting the Parse server in aim to monitor the added classes.
VPX can be configuration through configuration parameters available with Parse.
These parameters can be created with Parse Dashboard in Config > Create a parameter
.
Parameter | Type | Default value | Description |
---|---|---|---|
VpxCustomCloudCode |
String |
null |
Your custom cloud code to run on Parse server |
VpxLoggedEntities |
Array |
null |
Names of entities to monitor, use null to let VPX discover new entities |
VpxLoggedOperations |
Array |
["created", "updated", "deleted"] |
Operation types allowed to be logged |
VPX exposes jobs that can be executed through Parse API and Parse Dashboard:
vpx-reload
: Reloads VPX configuration, can be called when new Parse classes have been added to monitor them.vpx-exec-ccc
: Executes the custom cloud code.
You can use the docker-compose
provided to run locally VPX, Parse Server and Parse Dashboard:
- Clone or download this repository:
git clone https://github.com/virtua-sa/virtua-parse-extended.git
- Run docker-compose:
cd virtua-parse-extended
, thendocker-compose up
- Browse to: http://dashboard.vpx.docker/
- Login and password can be found in the
docker-compose.yml
file, under sectionparse-dashboard > environment > PARSE_DASHBOARD_USER_*
- Login and password can be found in the
Note: you'll need dnsdock
in aim to use this setup.
VPX - Virtua Parse eXtended is published under the terms of GNU Affero General Public License v3, see the LICENSE file.