14 – Lifespan Hooks via PAGI::Utils

Minimal app that uses PAGI::Utils::handle_lifespan for startup/shutdown hooks and serves a plain-text HTTP response.

Requirements

Quick Start

pagi-server --app examples/14-lifespan-utils/app.pl --port 5000

Demo

curl http://localhost:5000/
# => Hello from PAGI!

Stop the server with Ctrl+C to see the shutdown hook log message.

Spec References