Answer
The issue was in my original configuration file config/config.exs
.
I had
# Configures the endpoint
config :demo, DemoWeb.Endpoint,
url: [host: "localhost"],
secret_key_base: "MY_SECRET_KEY",
render_errors: [view: DemoWeb.ErrorView, accepts: ~w(html json), layout: false],
pubsub_server: Demo.PubSub,
live_view: [signing_salt: "yRZCwQIF"]
Here I was missing the line:
# Configures the endpoint
config :demo, DemoWeb.Endpoint,
server: true
So the full configuration should be:
# Configures the endpoint
config :demo, DemoWeb.Endpoint,
url: [host: "localhost"],
secret_key_base: "MY_SECRET_KEY",
render_errors: [view: DemoWeb.ErrorView, accepts: ~w(html json), layout: false],
pubsub_server: Demo.PubSub,
live_view: [signing_salt: "yRZCwQIF"],
server: true
With this configuration now the server works.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…