kgp*_*per 2 elixir phoenix-framework
这看起来像一个bug,但我不确定.任何人都可以告诉在不同的端口号上运行iex是否有效.它总是使用端口4000.
PORT=4001 iex -S mix phoenix.server
Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
[info] Running AppMessenger.Endpoint with Cowboy using http on port 4000
Interactive Elixir (1.2.5) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> 19 May 19:53:40 - info: compiled 5 files into 2 files, copied 3 in 714ms
Run Code Online (Sandbox Code Playgroud)
默认情况下,Phoenix中的端口config/dev.exs具有硬编码值4000.如果要在更改中使用PORT环境变量中的值:devconfig/dev.exs
http: [port: 4000]
Run Code Online (Sandbox Code Playgroud)
至
http: [port: {:system, "PORT"}]
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
871 次 |
| 最近记录: |