Laptop, AWS account, or other system capable of running NodeJS
The best way to use the KRL documentation is to search since you may not always appreciate how it's organized (or isn't).
For labs, you will find that keeping your rulesets on your file system (instead of Github) will be easiest.
People often can't get their ruleset to run because it doesn't parse. Make sure you always parse your ruleset before checking it into whatever system you're using to store it (probably GitHub).
If your changes don't seem to take effect, the most common cause is likely that GitHub's internal caching is returning the old ruleset even though you've checked in changes. Try waiting 5 minutes, refreshing, and trying again. Alternatively, use a local file for development and check into Github for turning the assignment in or use GitLab (Links to an external site.).. (Note: raw urls in private repositories will need an account access token.)
Note that if you have two rules in your installed rulesets that select on the same event, then they will both fire when the pico sees that event.
You can do this entire lab in one pico. You can do it in your account's primary pico, or you can create a child pico and install the rulesets there.
Complete the following:
Install the Pico Engine on the system of your choice. (As a reminder, the installation instructions are found in the Quickstart guide given above)
Copy the hello_world ruleset from the Quickstart into a resource that is accessible from a URL (can be a local URL using the file: schema).
Change the KRL in the hello_world ruleset so that it's not properly formatted.
Reparse it and note the error.
Fix the problem.
Install the ruleset at the URL you used in step (2) in your pico.
Create a new channel (pick any name and type you like, leave the policy open (*/*).
Send an event to the pico using the new channel and the original (default) channel.
Do you get the same result on both? Why or why not?
Delete the channel.
Resend the event using the deleted channel.
What happens? Why?
Send the event echo/hello to your pico. What do you observe? Why?
Send the misspelled event ecco/hello to your pico. What do you observe? Why?
Add a new rule to the hello_worldruleset that selects on echo/monkey and responds with "Hello Monkey" unless an event attribute named name is given, in which case it will respond with "Hello " followed by the given name. Hint: use the || operator. Use the .klog() operator to log the value that is used.