Created
October 6, 2014 12:29
-
-
Save tatsuru/2ff4b6c25e4133c9af12 to your computer and use it in GitHub Desktop.
plack sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Plack::Builder; | |
my $app = sub { | |
return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello World' ] ]; | |
}; | |
builder { | |
enable "ServerStatus::Lite", path => '/server-status', allow => ['127.0.0.1'], scoreboard => '/dev/shm/server-status', counter_file => '/tmp/counter_file'; | |
$app; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
requires 'Plack'; | |
requires 'Plack::Middleware::ServerStatus::Lite'; |
Author
tatsuru
commented
Oct 6, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment