NET-SERVER(1p)

πŸ’– NAME πŸ’–

okay bestie, listen up β€” net-server is your Base Net::Server starting module. that's it, that's the whole vibe. it's the lil entry point that gets the whole Net::Server party started πŸ‘‘

(this one ships inside the User Contributed Perl Documentation, and the manual page is NET-SERVER(1p) β€” write that down, iykyk πŸŽ€)


✨ SYNOPSIS ✨

here's how you call her, fr fr:

net-server [base type] [net server arguments]

net-server PreFork ipv '*'

net-server HTTP

net-server HTTP app foo.cgi

net-server HTTP app foo.cgi app /=bar.cgi

net-server HTTP port 8080 port 8443/ssl ipv '*' server_type PreFork --SSL_key_file=my.key --SSL_cert_file=my.crt access_log_file STDERR

no cap, that last one is doing the most and honestly? iconic πŸ¦‹


🌸 DESCRIPTION 🌸

so basically, net-server is the girl who lets you test out code and poke at port connection parameters without any drama πŸ’…

like yeah, technically the server that ends up running can be robust enough for production β€” but the actual plan here is that this binary is for basic testing of net-server ports. think of her as:

  • a simple echo server πŸ”
  • or the thing that runs your development scripts as CGI 🌈

she's not trying to be your whole production stack, she's trying to help you figure out if your ports are even behaving. periodt.


πŸŽ€ OPTIONS πŸŽ€

okay here's the menu, and every single item is on it, no skipping:

  • "base type" β€” the very first argument can be a Net::Server flavor. this is lowkey just shorthand so you don't have to write out server_type "ServerFlavor" yourself. plus, it lets types like HTTP and PSGI β€” which are not true Net::Server base types β€” subclass other server types by way of an additional server_type argument. the way that works:
net-server PreFork

net-server HTTP  # becomes a HTTP server in the Fork flavor

net-server HTTP server_type PreFork  # preforking HTTP server
  • "port" β€” the port to bind upon, bestie. defaults are giving very specific energy:
    • 80 if you're running a HTTP server as root
    • 8080 if you're running a HTTP server as non-root
    • 20203 otherwise

you can hand over multiple values to bind to multiple ports β€” yes, multiple, she's flexible 🫢 and all the methods for specifying port attributes enumerated in Net::Server and Net::Server::Proto are available right here. live your truth:

net-server port 20201

net-server port 20202

net-server port 20203/IPv6
  • "host" β€” the host to bind to. default is * ⭐
    • give her an IPv4 address β†’ she binds to an IPv4 socket
    • give her an IPv6 address β†’ she binds to an IPv6 socket (this one requires you install IO::Socket::IP or IO::Socket::INET6, so like… install it okay πŸ’€)
    • give her a hostname and "ipv" is still set to 4 β†’ an IPv4 socket gets created
    • give her a hostname and "ipv" is set to 6 β†’ an IPv6 socket gets created
    • give her a hostname and "ipv" is set to * (the default) β†’ a lookup is performed and any available IPv4 or IPv6 addresses will be bound

and the "ipv" parameter? you can set it directly, or pass it along in the port, or even pass it as part of the hostname. three (3) ways, she's versatile ✨

net-server host localhost

net-server host localhost/IPv4
ngl there are many more options available than just these. pls go read the Net::Server documentation β€” she has layers, and you deserve the full picture πŸ“š

πŸ‘‘ AUTHOR πŸ‘‘

Paul Seamons <paul@seamons.com>

(we love a credited icon πŸ’œ)


πŸ“œ LICENSE πŸ“œ

this package may be distributed under the terms of either of the:

  • GNU General Public License
  • or the Perl Artistic License

pick your fighter, both are valid, slay 🧚


okay that's the whole page!! source/version flex for the girlies: this is perl v5.40.1, dated 2026-04-11, and the page itself is NET-SERVER(1p) πŸ’– go forth and bind some ports, bestie β€” no cap, you got this 🌟

πŸ“¦ where this page comes from