RosettaCodeData/Task/Hello-world-Web-server/Perl/hello-world-web-server-4.pl

11 lines
338 B
Perl

use Plack::Runner;
my $app = sub {
return [ 200,
[ 'Content-Type' => 'text/html; charset=UTF-8' ],
[ '<html><head><title>Goodbye, world!</title></head><body>Goodbye, world!</body></html>' ]
]
};
my $runner = Plack::Runner->new;
$runner->parse_options('--host' => 'localhost', '--port' => 8080);
$runner->run($app);