Mojo::S...r::Morbo(3)

πŸ’… Mojo::Server::Morbo(3) β€” the group chat version

ok so this is Mojo::Server::Morbo(3), from the User Contributed Perl Documentation collection (yes bestie, the perl v5.42.0 docs, we're fancy now), and it is exactly as dramatic as the name suggests. Buckle up πŸŽ€


🌸 NAME 🌸

Mojo::Server::Morbo β€” Tonight at 11...DOOOOOOOOOOOOOOOM! πŸ’€πŸ”₯

like that's literally the official name, I didn't make it up, they really wrote that in the docs. iconic behavior honestly πŸ‘‘


✨ SYNOPSIS ✨

use Mojo::Server::Morbo;

my $morbo = Mojo::Server::Morbo->new;
$morbo->run('/home/sri/myapp.pl');

that's it, that's the whole vibe. new it up, run your app, slay πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so Mojo::Server::Morbo is a full featured, self-restart capable, non-blocking I/O HTTP and WebSocket server. it's built around the very well tested and reliable Mojo::Server::Daemon, so you're standing on solid ground, no cap 🫢

and the feature list?? it's giving main character energy:

  • IPv6 πŸ‘‘
  • TLS πŸ”₯
  • SNI 🌟
  • UNIX domain socket 🧚
  • Comet (long polling) ⭐
  • keep-alive πŸ’œ
  • multiple event loop support 🌈
⚠️ heads up bestie: this server uses signals for process management, so you should avoid modifying signal handlers in your applications. like, don't touch them. fr fr πŸ™ˆ

to actually start applications with it, you use the morbo script:

$ morbo ./myapp.pl
Web application available at http://127.0.0.1:3000

and now the good part β€” for better scalability (epoll, kqueue) and to provide non-blocking name resolution, SOCKS5 as well as TLS support, these optional modules will be used automatically if possible:

  • EV (4.32+)
  • Net::DNS::Native (0.15+)
  • IO::Socket::Socks (0.64+)
  • IO::Socket::SSL (2.009+)

and if you're feeling picky, individual features can also be disabled with the MOJO_NO_NNR, MOJO_NO_SOCKS and MOJO_NO_TLS environment variables πŸ’…

see "DEPLOYMENT" in Mojolicious::Guides::Cookbook for more β€” iykyk πŸ“š


πŸŽ€ SIGNALS πŸŽ€

the Mojo::Server::Morbo process can be controlled at runtime with the following signals. yes, at runtime, like live, mid-vibe πŸ¦‹

INT, TERM

Shut down server immediately. ⚑


πŸ’– ATTRIBUTES πŸ’–

Mojo::Server::Morbo implements the following attributes. all of them. every single one. we're not skipping anything, bestie 🌸

backend

my $backend = $morbo->backend;
$morbo      = $morbo->backend(Mojo::Server::Morbo::Backend::Poll->new);

Backend, usually a Mojo::Server::Morbo::Backend::Poll object. it's the behind-the-scenes girlie making it all work πŸ’…

daemon

my $daemon = $morbo->daemon;
$morbo     = $morbo->daemon(Mojo::Server::Daemon->new);

the Mojo::Server::Daemon object this server manages. your fave reliable little worker bee 🐝

silent

my $bool = $morbo->silent;
$morbo   = $morbo->silent($bool);

Disable console messages, defaults to a true value. so yes, it's quiet by default β€” dramatic queen who doesn't need to announce herself ✨


πŸ”₯ METHODS πŸ”₯

Mojo::Server::Morbo inherits all methods from Mojo::Base and implements the following new ones. only one new one, but it's a banger πŸ‘‘

run

$morbo->run('script/my_app');

Run server for application and wait for "SIGNALS". that's the whole method. it runs, it waits, it serves. periodt πŸ’€


🌟 SEE ALSO 🌟

go read them, they're literally right there 🫢


and that's the page, bestie! this one shipped with perl v5.42.0 and got stamped 2026-07-15, so if you're reading it any other time... time travel?? no idea, i don't make the rules πŸ™ˆπŸ’œ bye slay stay safe and don't touch your signal handlers πŸŽ€

πŸ“¦ where this page comes from