Skip to content

Commit be1471b

Browse files
authored
Fix inconsistency regarding default port env var (elixir-lang#1367)
Very similar to elixir-lang#1172 which missed last rewrite part that still raised error if env variable was not present.
1 parent e4328bc commit be1471b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

getting-started/mix-otp/task-and-gen-tcp.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ We could fix this by defining our own module that calls `use Task, restart: :per
297297

298298
```elixir
299299
def start(_type, _args) do
300-
port = String.to_integer(System.get_env("PORT") || raise "missing $PORT environment variable")
300+
port = String.to_integer(System.get_env("PORT") || "4040")
301301

302302
children = [
303303
{Task.Supervisor, name: KVServer.TaskSupervisor},

0 commit comments

Comments
 (0)