Erlang | Get Started

Ralph/ April 23, 2020/ Erlang

Installation

Erlang / Elixir

brew install elixir

phx_new

mix archive.install hex phx_new

First Steps

Create sample project

mix phx.new hello
* creating hello/config/config.exs
* creating hello/config/dev.exs
* creating hello/config/prod.exs
* creating hello/config/prod.secret.exs
...
* creating hello/assets/css/phoenix.css
* creating hello/assets/static/images/phoenix.png
* creating hello/assets/static/robots.txt

Fetch and install dependencies? [Yn] Y
* running mix deps.get
Phoenix uses an optional assets build tool called webpack
that requires node.js and npm. Installation instructions for
node.js, which includes npm, can be found at http://nodejs.org.

The command listed next expect that you have npm available.
If you don't want webpack, you can re-run this generator
with the --no-webpack option.

We are almost there! The following steps are missing:
    $ cd hello
    $ cd assets && npm install && node node_modules/webpack/bin/webpack.js --mode development

Then configure your database in config/dev.exs and run:
    $ mix ecto.create

Start your Phoenix app with:
    $ mix phx.server

You can also run your app inside IEx (Interactive Elixir) as:
    $ iex -S mix phx.server

Share this Post