diff --git a/META6.json b/META6.json index 2808d40..b4c65ef 100644 --- a/META6.json +++ b/META6.json @@ -1,6 +1,9 @@ { "name": "Hyperlink-Redirect", - "depends": ["Humming-Bird"], + "depends": [ + "Humming-Bird", + "Template6" + ], "provides": { "Hyperlink-Redirect": "lib/Hyperlink-Redirect.rakumod" } diff --git a/lib/Hyperlink-Redirect.rakumod b/lib/Hyperlink-Redirect.rakumod index c970f16..1d992a7 100644 --- a/lib/Hyperlink-Redirect.rakumod +++ b/lib/Hyperlink-Redirect.rakumod @@ -1,13 +1,18 @@ 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.write('testing 123...') + $response.html($templates.process: 'index'); }); diff --git a/templates/index.tt b/templates/index.tt new file mode 100644 index 0000000..0d12724 --- /dev/null +++ b/templates/index.tt @@ -0,0 +1,10 @@ + + + + Test page + + +

Ayy...

+

lmao

+ +