Skip to content

How To Change HTTP Port

Dimitrios Zorbas edited this page Nov 13, 2016 · 2 revisions

The default HTTP port is 4000. You can specify a different port with any of the following ways:

Via a command-line Erlang option:

elixir --erl '-kitto port 5000' -S mix kitto.server

Via a command-line Erlang option (iex):

iex  --erl '-kitto port 5000' -S mix

Via the config/config.ex file:

config :kitto, port: 5000

Via ENV:

Change config/config.ex to fetch the port from the environment.

config :kitto, port: {:system, "KITT0_PORT"}

Pass the env variable when starting the server

KITTO_PORT=4444 mix kitto.server