Skip to content

Instantly share code, notes, and snippets.

@kazuho
Created February 19, 2015 07:38
Show Gist options
  • Save kazuho/b9398386152676bba98b to your computer and use it in GitHub Desktop.
Save kazuho/b9398386152676bba98b to your computer and use it in GitHub Desktop.
use strict;
use warnings;
use Plack::Loader;
use Time::HiRes qw(sleep);
my $loader = Plack::Loader->load(
'Starlet',
port => 1234,
max_workers => 1,
#max_keepalive_reqs => 100,
);
$loader->run(sub {
my $env = shift;
sleep 0.1;
return [
200,
[ 'content-type' => 'text/plain', 'content-length' => 11 ],
[ 'hello world' ],
];
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment