Written by

After a break in our “new languages” series, today we present Elixir. This functional language, created in 2011 and using the Erlang VM, is known among other things for its fault tolerance and hot swapping.

Fifth major language

Elixir is the fifth “major” language to be supported on alwaysdata. We recently explained in detail what constitutes a major language, so we won’t reiterate that here. We’ll just mention that we’re offering the latest version of Elixir (1.5.2), operating on Erlang 19.2, and that a new type of site has appeared in our administration panel.

Example: deploying a Phoenix application

Phoenix is one of the primary web frameworks for Elixir. Which is why it’s the one that we’ll be using in our deployment example.

Let’s log into our SSH account, then install Phoenix, and create a new application:

We need to edit the file config/prod.exs in such a way as to replace the line:

with:

Finally, we have to compile the application:

Last step, let’s go into alwaysdata’s administration panel, then create an Elixir website and specify:

  • command: mix phx.server
  • working directory: myapp
  • environment: MIX_ENV=prod

And there you have it, our application is reachable via the web and will show Welcome to Phoenix!

Next language to get its moment in the blog’s spotlight: Java.