Hacker News new | ask | show | jobs
by losvedir 3913 days ago
It might be worth looking at how Phoenix[0] does it (or, you know, just consider using Elixir/Phoenix). Phoenix runs on cowboy out of the box and makes setting up a web app a snap:

    $ mix phoenix.new my_app
which then sets up the directory structure for you to just run

    $ mix phoenix.server
and have cowboy serving your webapp. The guides then tell you which files to add new routes, controllers, models, etc (in a way similar to Django or Rails). All that said, it's in Elixir at that point, but maybe you could still infer how the applications and gen servers and whatnot are structured from it.

It may be worth asking josevalim and chrismccord in #elixir-lang for tips on setting it up, since they obviously must know how to set up cowboy pretty well to build a system on top of it.

I think Erlang and things like cowboy and OTP are absolutely amazing for the web, but Elixir has made things 100x easier to get up and running with them.

[0] https://github.com/phoenixframework/phoenix