I'd like to run a perl6/raku Cro app as a service behind a frontend webserver.
Just running cro run
won't handle restarting after segfaults & reboots.
Previously with perl5 I've used FastCGI - however Cro::HTTP::Server
's Cro::HTTP::Server.new().start()
idiom doesn't look compatible with FastCGI::Native's while $fcgi.accept() {}
example.
The service.p6
generated by cro stub
does have a SIGINT
handler, however I'm unsure whether this is sufficient to point to it in a systemctl
service, i.e.
[Service]
ExecStart = /path/to/service.p6
How are people currently hosting Cro apps?