Mind-Fuck/basic-site/basic-site.raku
2023-11-09 21:37:39 -05:00

21 lines
406 B
Raku
Executable file

#!/usr/bin/env raku
use v6.d;
use Humming-Bird::Core;
use Humming-Bird::Middleware;
use Humming-Bird::Advice;
use Template::Mustache;
middleware &middleware-logger;
advice &advice-logger;
my $template = Template::Mustache.new: :from<./templates>;
get '/', -> $request, $response {
my Str %stash = title => 'Hello, web!';
$response.html($template.render: 'index', %stash);
};
listen 3000;