To start your Phoenix server:
- Run
mix setup
to install and setup dependencies - Run
mix ecto.create
to setup Phoenix DB - Start Phoenix endpoint with
mix phx.server
or inside IEx withiex -S mix phx.server
Now you can visit localhost:4000
from your browser.
# Phoenix internal DB
docker run -it --replace --pull=always --name phoenix-liveview -p 5433:5432 -e POSTGRES_PASSWORD=postgres -d postgres
# XTDB
docker run -it --name phoenix-liveview-xtdb --pull=always -p 6543:3000 -p 5432:5432 ghcr.io/xtdb/xtdb
Setup LiveView PostgresQL config in config/dev.exs
config :elixir_xtdb, ElixirXtdb.Repo,
username: "postgres",
password: "postgres",
hostname: "localhost",
port: 5433,
database: "elixir_xtdb_dev",
stacktrace: true,
show_sensitive_data_on_connection_error: true,
pool_size: 10
Ready to run in production? Please check our deployment guides.
- Official website: https://www.phoenixframework.org/
- Guides: https://hexdocs.pm/phoenix/overview.html
- Docs: https://hexdocs.pm/phoenix
- Forum: https://elixirforum.com/c/phoenix-forum
- Source: https://github.com/phoenixframework/phoenix