Deploying a Nitrogen application on Heroku
02 Jul 2014

##Nitrogen is simple and powerful

Do you know Nitrogen? Have a look at the demos.

Nitrogen is a very elegant way of developping web applications. It is event-based, and seamlessly integrate client side and server side in some smooth erlang/elixir code.

I work on a couple projects currently. One is the usual Ruby on Rails, Angular, CoffeeScript stack like we do now. The other is Nitrogen + DynamoDB.

On the former, I keep hopping from language to language, framework to framework, enabling one layer to talk to the other. On the latter, I just write Erlang for both client and server. Nitrogen takes care of the rest. I love that.

But Rails can be so easily deployed and scaled on Heroku. I wanted the same for my Nitrogen app.

A quick Google search came up with not much; I guess it was a job for me!

##Hummmph, that was easy

Here is a skeleton project cstar/nitrogen-on-heroku with Cowboy as the webserver. How to use :

  1. Pull cstar/nitrogen-on-heroku
  2. Write your awesome Nitrogen app
  3. Create the Heroku app heroku create --buildpack git://
  4. Push your app to Heroku git push heroku master
  5. ET VOILA!

What is remarkable about cstar/nitrogen-on-heroku?

I generated the template from Nitrogen with make rel_cowboy, took the generated site directory and :

Feel free to adapt to your own liking.

Note that deployment fetches and rebuilds all the dependencies. Everytime. I do have a fork of the “official” erlang buildpack which stores deps in the Heroku cache. Fetch it at your own risk, as it’s outdated.

Thank you for your visit!

About this blog

This blog is written and maintained by the guy on the left, Eric Cestari.
I do consulting and development through cstar industries SARL, based in Montreuil, France. I develop web and realtime web applications for my clients, using technologies such as the CLOUD, Erlang/OTP, ejabberd, and various web frameworks. Since 2000.