You should see startup message in the server logs indicating lifespan initialization.
2. Demo with curl:
# Request uses state initialized during lifespan.startup
curl http://localhost:5000/
# => Hello from lifespan state!
# Make multiple requests - all use the same shared state
curl http://localhost:5000/
curl http://localhost:5000/
3. Test shutdown:
Press Ctrl+C to stop the server and observe the clean shutdown sequence in the logs.
Spec References
Lifespan events – PAGI::Spec::Lifespan
HTTP events – PAGI::Spec::Www
Keyboard Shortcuts
Global
s
Focus search bar
?
Bring up this help dialog
GitHub
gp
Go to pull requests
gi
Go to GitHub issues (only if GitHub is preferred repository)