Support filtering by version in App::Web::NAOdash
[nethack-naodash.git] / app.psgi
1 #!/usr/bin/perl
2 use 5.014000;
3 use warnings;
4
5 use App::Web::NAOdash;
6 use File::Slurp;
7 use Plack::Builder;
8
9 my $index = read_file 'web/index.html';
10
11 builder {
12 mount '/dash/' => App::Web::NAOdash->new->to_app;
13 mount '/json/' => App::Web::NAOdash->new(json => 1)->to_app;
14 mount '/ok' => sub { [200, [], []] };
15 mount '/' => sub {
16 [200, [
17 'Cache-Control' => 'max-age=86400',
18 'Content-Type' => "text/html; charset=utf-8",
19 'Content-Length' => length $index,
20 ], [$index]]
21 };
22 }
This page took 0.022676 seconds and 4 git commands to generate.