Mind-Fuck/basic-site/basic-site.raku

21 lines
406 B
Raku
Raw Normal View History

2023-11-10 02:37:39 +00:00
#!/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;