Hyperlink-Redirect/lib/Hyperlink-Redirect.rakumod
2023-09-24 00:45:18 -04:00

19 lines
440 B
Raku

use v6.d;
use Humming-Bird::Core;
use Template6;
# Normally would 'use' local libs here for Controller and Model and
# what not but keeping it simple for now...
# Where art thou templates
my $templates = Template6.new;
$templates.add-path: 'templates';
# Must set the root path lest yet miss setting $!root
my $router = Router.new(root => '/');
$router.get(-> $request, $response {
$response.html($templates.process: 'index');
});