diff options
| author | pepper <pepper@chimecrisis.com> | 2014-07-14 23:12:46 -0700 |
|---|---|---|
| committer | pepper <pepper@chimecrisis.com> | 2014-07-14 23:12:46 -0700 |
| commit | 77bb4587f9097f8f1158c60d4d8a910890333b95 (patch) | |
| tree | 584fd5f78dbfface5a7677866c7430c68b73b8bc /bin/app.pl | |
yo yo yo
Diffstat (limited to 'bin/app.pl')
| -rw-r--r-- | bin/app.pl | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/bin/app.pl b/bin/app.pl new file mode 100644 index 0000000..8556038 --- /dev/null +++ b/bin/app.pl @@ -0,0 +1,28 @@ +#!/usr/bin/env perl +use Dancer2; +use Data::Dumper; +set public => './'; + +get '/download/*.*' => sub { + my ($file, $ext) = splat; + # do something with $file.$ext here +}; + +get qr{/img/([\w\.\-_]+)} => sub { + my ($filename) = splat; + send_file sprintf("/img/%s", $filename); +}; +get qr{/css/([\w\.\-_]+)} => sub { + my ($filename) = splat; + send_file sprintf("/css/%s", $filename); +}; +get qr{/js/([\w\.\-_]+)} => sub { + my ($filename) = splat; + send_file sprintf("/js/%s", $filename); +}; +get qr{/fonts/([\w\.\-_]+)} => sub { + my ($filename) = splat; + send_file sprintf("/fonts/%s", $filename); +}; + +dance; |
