Bump version and update Changes
[nethack-naodash.git] / app.psgi
CommitLineData
01ba3ddc
MG
1#!/usr/bin/perl
2use 5.014000;
3use warnings;
4
5use App::Web::NAOdash;
42f966d6 6use File::Slurp;
01ba3ddc
MG
7use Plack::Builder;
8
42f966d6
MG
9my $index = read_file 'web/index.html';
10
01ba3ddc
MG
11builder {
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, [], []] };
42f966d6
MG
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 };
01ba3ddc 22}
This page took 0.01231 seconds and 5 git commands to generate.