This repo was built to use a Nix development environment, but any should suffice. This repo was built with Elixir 1.17.3 and OTP 27. To use the setup in this repo:
- Install direnv through your
home-manager
,darwin-configuration.nix
, Homebrew, or similar. - Install the Nix package manager following the multi-user installation approach. Verify it's installed with
nix --version
. - Allow Nix experimental features by default:
mkdir ~/.config/nix/
touch ~/.config/nix/nix.conf
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
- Build the Nix Flake derivation:
cd indoor_air_quality
direnv allow .
- Once the output stops, check that you have access to Elixir 1.17:
indoor_air_quality (nix-flake-setup)> elixir --version
Erlang/OTP 27 [erts-15.0] [source] [64-bit] [smp:14:14] [ds:14:14:10] [async-threads:1] [jit]
Elixir 1.17.3 (compiled with Erlang/OTP 27)
Additionally, a docker-compose.yml file is provided for postgres setup. To use:
docker-compose up -d
To start your Phoenix server:
- Run
mix setup
to install and setup dependencies - Start Phoenix endpoint with
mix phx.server
or inside IEx withiex -S mix phx.server
Now you can visit localhost:4000
from your browser.
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