When packaging for Google Cloud Functions deployment, Corticon.js generates the files:
  • decisionServiceBundle.js: Your rules, obfuscated
  • index.js: Sample Google Cloud Functions wrapper

When invoked, the Google Cloud function is passed a JSON payload. This is most likely triggered by a REST call to invoke the function.

The wrapper, index.js, implements the Google Cloud Functions API for responding to HTTP triggers. The wrapper is a complete, ready-to-run, Google Cloud function that you can also modify to meet the specific needs of your application as it is heavily annotated. The Google Cloud functions API has different signatures for different triggers.

The following video is a Corticon.js Google Cloud Functions deployment walkthrough:

See the Google Cloud Functions documentation for details on deploying serverless functions.