Phoenix LiveView not working in Production Server

I am using a LiveView feature the same used in the LiveView repo examples https://github.com/chrismccord/phoenix_live_view_example/tree/master/lib/demo_web/live/user_live which works perfectly okay on localhost. But it does not work on the production server. When I press the Submit button it just keeps showing Loading... status.

Is there any difference in setup for LiveView on a production server or have I missed something?

Hello, I’d suggest first to check that you have configured the proper host in the endpoint configuration in config/prod.exs. Hth.

2 Likes

Hi @patrickdm
you mean this part url: [host: "example.com", port: 80] right?

Yes, there you should have the production server actual IP or its domain name (if any).

I have just done that. But still not working

ok, that was a blind guess… better look at evidence then… what is the error saying?

oooh sorry my bad, actually it worked. I had the wrong spelling for the domain name

2 Likes