https://hexdocs.pm/phoenix/up_and_running.html

创建新的框架:

mix phx.new hello

然后就会看到自动生成以下文件:

mix phx.new hello
* creating hello/config/config.exs
* creating hello/config/dev.exs
* creating hello/config/prod.exs
...
Fetch and install dependencies? [Yn]

直接回车即可

完成就会提示接下来的操作:

Fetch and install dependencies? [Yn] Y
* running mix deps.get
* running mix deps.compile
We are almost there! The following steps are missing:
    $ cd hello
Then configure your database in config/dev.exs and run:
    $ mix ecto.create
Start your Phoenix app with:
    $ mix phx.server
You can also run your app inside IEx (Interactive Elixir) as:
    $ iex -S mix phx.server

进入文件夹:

cd hello

创建文件:

mix ecto.create
Compiling 13 files (.ex)
Generated hello app
The database for Hello.Repo has been created

启动server

mix phx.server
[info] Running HelloWeb.Endpoint with cowboy 2.9.0 at 127.0.0.1:4000 (http)
[info] Access HelloWeb.Endpoint at http://localhost:4000
[watch] build finished, watching for changes...
...