Dtodoaqui
To start your Phoenix server:
- Install dependencies with
mix deps.get
- Create and migrate your database with
mix ecto.setup
- Install Node.js dependencies with
cd assets && npm install
- Start Phoenix endpoint with
mix phx.server
Now you can visit localhost:4000
from your browser.
For use PORT 80
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 4000
(Yey! But only in production ;d)
production mode
mix deps.get --only prod
MIX_ENV=prod mix compile
MIX_ENV=prod mix ecto.setup
cd assets && webpack --mode production
mix phx.digest
MIX_ENV=prod mix phx.server
MIX_ENV=prod PORT=4001 elixir --detached -S mix do compile, phx.server
Ready to run in production? Please check our deployment guides.
Learn more
- Official website: http://www.phoenixframework.org/
- Guides: https://hexdocs.pm/phoenix/overview.html
- Docs: https://hexdocs.pm/phoenix
- Mailing list: http://groups.google.com/group/phoenix-talk
- Source: https://github.com/phoenixframework/phoenix