Phoenix
Related
Installation
$ mix archive.install hex phx_new [version]
$ mix phx.new —version
$ mix help phx.new
$ mix archive.uninstall phx_new
Creating a Project
$ mix phx.new my_project
Development Commands
- Dev server:
mix phx.server - Console:
iex -S mix mix help phx.[subtask]mix phx- list all commandsmix phx.routesmix phx.servermix phx.gen.[auth,json,live,schema]
mix ectomix ecto.createmix ecto.dropmix ecto.gen.migrationmix ecto.migratemix ecto.rollback
mix run priv/repo/seeds.exs
Generators
mix phx.gen.[json,live,schema] Context Schema tableplural \
title:string description:text views:integer \
status:enum:pending:open:closed parent_id:references:parent
https://phoenix.hexdocs.pm/Mix.Tasks.Phx.Gen.Schema.html#module-attributes
Development Environment
- elixir-oh-my-zsh plugin
- VS Code (not Codium) for Phoenix Framework plugin
- ElixirLS plugin
”editor.formatOnSave”: true”elixirLS.suggestSpecs”: false
- Phoenix Framework plugin for
.heexsupport - Tailwind plugin
- ElixirLS plugin
- Dank Mono font for pipe operator ligatures
Slapdash