Course of Raku / Functional, concurrent, reactive, and web programming / Web programming / Cro 101 / Exercises
A route with a parameter
Problem
Using Cro, write a route block with a GET
route for hello followed by a name segment
taken as a parameter, so that the path /hello/Anna returns
the plain text Hello, Anna!. The segment after
hello becomes a variable you use in the response.
This exercise needs Cro installed (
zef install cro).
Example
A request to /hello/Anna returns:
Hello, Anna!