How to run Snap haskell webapp in production?

后端 未结 3 2002
隐瞒了意图╮
隐瞒了意图╮ 2021-01-30 11:14

I\'ve installed Snap/Haskell on my production Ubuntu server (on EC2), and checked-out my project - but how do I run it?

I mean, locally, I run it from command line:

3条回答
  •  耶瑟儿~
    2021-01-30 11:48

    Since it's Ubuntu, you're almost always better off using upstart to manage it.

    man 5 init

    Among other things, it lets you set dependency hierarchies for your services. "snapapp depends on mongodb so don't start snapapp until mongodb is running" - that sort of thing.

    Yes, snap is a web server, but we almost always put nginx in front of them with the snap apps only listening on localhost, and a proxy_path pointing to the server or a group of them.

    Funny enough, we've almost completely switched to Common Lisp for new development at $work and the setup is exactly the same.

提交回复
热议问题