Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

https://devcenter.kinvey.com/rest/guides/flexservice-runtime

Flex Service

Flex Functions

Flex functions are used to execute custom code by either hooks, or in our case, endpoints.

In the code, you can access the flex functions through the functins property: 

const functions = flex.functions;


Then, you can register a custom function using this property:

flex.functions.register('someEventHandlerName', 'someFunctionHandlerName');


Custom flex functions must recieve as parameters: (context, complete, modules).



Kinvey Create/Deploy Service

Test collection - kinvey console command

To deploy the Kinvey Camunda service, use the following command: kinvey flex deploy --runtime node12.

NOTE: Each time you redeploy the service, you need to bump the version in the package.json.


After you run the deploy command, you can check de deploy status using kinvey flex status.


For more details, you can use the kinvey flex logs command to see deploy logs or even request logs from Kinvey.

For more details on each commands options, you can use kinvey flex <command> --help


Once your service was deployed, you can check your collection from the API console, under Dashboard →Data (see below screenshot).

Here, you can test your collection/service with different requests: GET, POST, PUT, DELETE:


Image Added


Kinvey Collections

...