Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: node pico engine can flush a ruleset

...

Because the rules engine reads your KRL program from the Web, it has to be available online. You can host it anywhere, but Github works especially well. See these instructions for more information about how to use Github to host KRL

...

titleEngine Compatibility

...

The pico engine compiles your KRL into a Node.js module, which it stores in a folder at ~/.pico-engine/rulesets. (Node.js is a trademark of Joyent, Inc. and is used with its permission. We are not endorsed by or affiliated with Joyent.)

Flushing the Ruleset

Wherever you host your code, the rules engine caches it after parsing it for better performance. That means that you need to flush your code from the rules engine cache whenever you update it. After pushing a change to your ruleset, you will need to manually delete it from the pico(s) in which it is installed, and install it again.The pico engine compiles your KRL into a Node.js module, which it stores in a folder at ~/.pico-engine/rulesets. (Node.js is a trademark of Joyent, Inc. and is used with its permission. We are not endorsed by or affiliated with Joyent.)instruct the pico engine to retrieve the source code again and re-compile it. Use a URL like this one:

Code Block
http://localhost:8080/api/ruleset/flush/hello_world

You will need to give the correct domain and port for your pico engine, and mention at the end the RID of your ruleset. In the example above, the RID is hello_world. You may also flush the ruleset by going to the Rulesets tab, deleting the ruleset from your pico, and entering its URL and clicking on the "install ruleset from URL:" button.

Parsing KRL

You need to be able to check your ruleset for parse errors before checking it in. Debugging syntax errors on the rules engine is a messy business. 

...