HTTP::Server::PSGI(3)

πŸ’– HTTP::Server::PSGI πŸ’–

okay so bestie, grab your matcha because we're talking about HTTP::Server::PSGI β€” that's the User Contributed Perl Documentation entry, page HTTP::Server::PSGI(3), and she is literally the chillest little standalone HTTP server you'll ever meet. ✨


🌸 NAME 🌸

HTTP::Server::PSGI β€” a standalone, PSGI compatible HTTP server. that's it, that's the girl. πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

use HTTP::Server::PSGI;

my $server = HTTP::Server::PSGI->new(
    host => "127.0.0.1",
    port => 9091,
    timeout => 120,
);

$server->run($app);

like... look at her. so clean. so unbothered. 🌸


✨ DESCRIPTION ✨

HTTP::Server::PSGI is a standalone, single-process, and PSGI compatible HTTP server implementation. lowercase "implementations" in the original, we don't fix her grammar, she's iconic. πŸ’…

Real talk though β€” this server is great for development and testing, but it might not be suitable for a production use. she's a vibes server, not a load-bearing server. 🫢

Some HTTP/1.1 features are NOT supported, and we're naming names:

  • chunked requests πŸ’€
  • chunked responses πŸ’€
  • pipeline requests πŸ’€

and she also does not support HTTP/0.9. nope. not even a little.

if you want HTTP/1.1 and other features that are actually ready for a production use, go check out Starman or a uWSGI server instead. no hard feelings, bestie. 🌈

πŸ¦‹ PREFORKING πŸ¦‹

HTTP::Server::PSGI does NOT support preforking. like, at all. she is one process and she's thriving. πŸ™ˆ

want a multi-process prefork web server? go see Starman or Starlet. they're the ones with the whole squad. πŸ‘‘


πŸ’€ HARAKIRI SUPPORT πŸ’€

This web server supports the psgix.harakiri extension defined in the PSGI::Extensions. yes, harakiri. yes, it's dramatic. it's giving main character energy. πŸŽ€

So here's the tea: this application is a non-forking single process web server β€” which means psgi.multiprocess is false β€” and if your application commits harakiri, the entire web server stops too. the whole thing. gone. πŸ’€

if that behavior is not what you want, be sure to check psgi.multiprocess as well, so you only enable harakiri in the preforking servers such as Starman. always do the vibe check first, fr fr. βœ…

On the other hand? this behavior might be handy if you want to embed this module in your application and serve HTTP requests for only a short period of time, then go back to your main program. lowkey a feature, highkey a slay. πŸ’…


πŸ‘‘ AUTHOR πŸ‘‘

  • Kazuho Oku
  • Tatsuhiko Miyagawa

legends. both of them. periodt. 🫢


πŸ”₯ SEE ALSO πŸ”₯

  • Plack::Handler::Standalone
  • Starman
  • Starlet

and that's the whole page bestie!! 🌈✨ this was perl v5.42.3, dated 2026-10-18, and you just read HTTP::Server::PSGI(3). go forth and serve some requests, you absolute icon. πŸ’–πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from