Autorun the Faye server when I start the Rails server

前端 未结 4 705
生来不讨喜
生来不讨喜 2020-12-24 03:25

I currently have Faye working with my Rails 3.0.9 application. However I have two separate tabs open in my terminal. One for the Faye server, and one for the Rails server. H

4条回答
  •  遥遥无期
    2020-12-24 03:54

    Nowadays, I'd just use Foreman for this: https://github.com/ddollar/foreman

    By creating a Procfile, you can specify which daemons need to run (with control for how many of them of each you want), and keeps everything in one terminal window (with great color coding of each process). It can even export to upstart or init.d scripts for production, if your environment is debian based.

    Once your Procfile is all set up, then all you need to do is run: foreman start and you're off to the races. I use it for resque and faye.

提交回复
热议问题