Initial commit++

This commit is contained in:
swagg boi 2025-05-15 15:49:29 -04:00
parent 0385bf15b7
commit 464ae72894
2 changed files with 44 additions and 1 deletions

View File

@ -1,3 +1,9 @@
# hr2
Sequel to the smash hit [Hyperlink-Redirect](https://git.seriousbusiness.international/swaggboi/Hyperlink-Redirect)
Sequel to the smash hit
[Hyperlink-Redirect](https://git.seriousbusiness.international/swaggboi/Hyperlink-Redirect)
## TODOs
- Tests
- Fill in placeholder comments

37
hr2.pl Normal file
View File

@ -0,0 +1,37 @@
#!/usr/bin/env perl
# May 2025
# Jia Tan <JiaT75@gmail.com>
use Mojolicious::Lite -signatures;
use Mojo::Util qw{b64_decode b64_encode
gunzip gzip
url_escape url_unescape};
get '/', sub ($c) { $c->redirect_to('create') };
get '/create', sub ($c) {
$c->render;
};
post '/create', sub ($c) {
# Process the input...
$c->render;
};
get '/--meta-refresh/*hyperlink', sub ($c) {
my $hyperlink = $c->param('hyperlink');
# Process input...
$c->redirect_to($hyperlink);
};
get '/*hyperlink', sub ($c) {
my $hyperlink = $c->param('hyperlink');
# Process input...
$c->redirect_to($hyperlink);
};
app->start;