Rand Stats

Crolite

zef:FCO

Actions Status

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 routes

Run a dev server:

raku example.raku daemon --port=3000

Test a route ad-hoc:

raku example.raku GET /something/42

DESCRIPTION

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:

Goals

Caveats

AUTHOR

Fernando Corrêa de Oliveira fco@cpan.org

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.