Created
August 11, 2017 09:30
-
-
Save erikvullings/8e8d5ae026748681de8ddde90d835cde to your computer and use it in GitHub Desktop.
Starting a new phoenix application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Phoenix, by default, uses a Postgres database, so start one via docker | |
docker pull postgres | |
# Expose it on port 8432 | |
docker run -p 8432:5432 --name hello-postgres -e POSTGRES_PASSWORD=postgres -d postgres | |
# Install Erlang, Elixir, and now Phoenix | |
mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez | |
# Create a new Phoenix app | |
mix phx.new hello | |
# Edit config/dev.exs and update your hostname. Add a port (default is 5432, but I've mapped it to 8432) | |
# Create your database | |
mix ecto.create | |
# Run Phoenix | |
mix phx.server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment