summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/app.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/app.pl b/bin/app.pl
index 8556038..b18b726 100644
--- a/bin/app.pl
+++ b/bin/app.pl
@@ -1,5 +1,5 @@
#!/usr/bin/env perl
-use Dancer2;
+use Dancer;
use Data::Dumper;
set public => './';
@@ -8,6 +8,10 @@ get '/download/*.*' => sub {
# do something with $file.$ext here
};
+get '/' => sub {
+ send_file "./index.html";
+};
+
get qr{/img/([\w\.\-_]+)} => sub {
my ($filename) = splat;
send_file sprintf("/img/%s", $filename);