Open bararchy opened 9 years ago
Why do we need this ?
Because unlike rails (Ruby), you cannot install a Crystal addon into apache or nginx , which means that you can only use Crystal's HTTP::Server , this in turn means that we need an option to start our programs as a service in the background without the need to relay upon VT environment and so we can initiate it via Systemd or init .
for all of those we need the bin to be able to start as a service
Actually we don't install any addon to apache / nginx in Ruby world.
We mostly use Nginx / Apache as a reverse proxy and static file server other than that we have Ruby web servers (Puma, Thin, Unicorn e.g) which handles the incoming requests.
@Sdogruyol Thats cool to know, but it doesn't change the fact that we need to add a fork or app.serve_in_background
option
Docker and mac LaunchAgents only work if you run in the foreground. Systemd can work either way.
I agree that this used to be the only way to run, but now a days I wonder. What environment are you running?
We need to add some option to "run in the background".
we can use
fork
or some internal design to this this thing.