README
NAME
Crolite - Lightweight Cro routing + tiny CLI wrapper
SYNOPSIS
use Crolite;
get -> $a { # /<anything>
content 'text/plain', 'worked';
}
delete -> 'something', Int $var { # /something/<int>
content 'application/json', %( :$var );
}List routes:
raku example.raku routesRun a dev server:
raku example.raku daemon --port=3000Test a route ad-hoc:
raku example.raku GET /something/42DESCRIPTION
Crolite removes boilerplate when hacking together small Cro HTTP examples. Importing it allocates a fresh Cro::HTTP::Router::RouteSet (stored in PROCESS scope) and exports the usual Cro routing helpers along with a multi MAIN providing:
routes— print collected endpoint signatures.daemon— start aCro::HTTP::Serverwith your route set (Ctrl+C to stop).GET|POST|PUT|DELETE <path>— perform a single in-memory request using Cro::HTTP::Test.http <path> --method=<verb>— generic form accepting any method string.
Goals
Rapid prototyping / teaching.
Introspection of defined routes without extra code.
Preserve native Cro primitives (no bespoke DSL).
Caveats
Early sketch; API may shift.
Thin error handling; exceptions surface directly.
Not a full project scaffold (logging/TLS/config left to Cro proper).
AUTHOR
Fernando Corrêa de Oliveira [email protected]
COPYRIGHT AND LICENSE
Copyright 2025 Fernando Corrêa de Oliveira
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.