Hyperlink-Redirect/lib/Hyperlink-Redirect.rakumod

19 lines
440 B
Raku
Raw Normal View History

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