From 9fcc556a609d5d780620ad7900b27ad5b10e044a Mon Sep 17 00:00:00 2001 From: swaggboi Date: Sat, 23 Sep 2023 00:44:32 -0400 Subject: [PATCH] Initial commit++ --- Dockerfile | 0 META6.json | 7 +++++++ README.md | 6 +++++- bin/hyperlink-redirect | 14 ++++++++++++++ lib/Hyperlink-Redirect.rakumod | 13 +++++++++++++ 5 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 META6.json create mode 100755 bin/hyperlink-redirect create mode 100644 lib/Hyperlink-Redirect.rakumod diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e69de29 diff --git a/META6.json b/META6.json new file mode 100644 index 0000000..2808d40 --- /dev/null +++ b/META6.json @@ -0,0 +1,7 @@ +{ + "name": "Hyperlink-Redirect", + "depends": ["Humming-Bird"], + "provides": { + "Hyperlink-Redirect": "lib/Hyperlink-Redirect.rakumod" + } +} diff --git a/README.md b/README.md index 3408dc5..99ef524 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ # Hyperlink-Redirect -A "useful" tool for turning hyperlinks into redirects in the name of shortening hyperlinks! 🧠 🧑‍🔬 \ No newline at end of file +A "useful" tool for turning hyperlinks into redirects in the name of shortening hyperlinks! 🧠 🧑‍🔬 + +## TODO + +1. Fix my `.emacs` to style stuff in a way that is not in fact insane diff --git a/bin/hyperlink-redirect b/bin/hyperlink-redirect new file mode 100755 index 0000000..91d0e90 --- /dev/null +++ b/bin/hyperlink-redirect @@ -0,0 +1,14 @@ +#!/usr/bin/env raku + +# It is important that you import App::MyService after +# Humming-Bird::Core to avoid having some weird side-effects with +# route declarations in your service + +use v6.d; +use Humming-Bird::Core; + +# Local libs +use lib 'lib'; +use Hyperlink-Redirect; + +listen(3000); diff --git a/lib/Hyperlink-Redirect.rakumod b/lib/Hyperlink-Redirect.rakumod new file mode 100644 index 0000000..c970f16 --- /dev/null +++ b/lib/Hyperlink-Redirect.rakumod @@ -0,0 +1,13 @@ +use v6.d; + +use Humming-Bird::Core; + +# Normally would 'use' local libs here for Controller and Model and +# what not but keeping it simple for now... + +# Must set the root path lest yet miss setting $!root +my $router = Router.new(root => '/'); + +$router.get(-> $request, $response { + $response.write('testing 123...') +});