Hello guys !
I want to make websocket at this endpoint : ws://xxxx/cable
So, i’ve tried this in my endpoint file:
//Endpoint.ex
But when i run mix phx.routes i got this:
There is a “/websocket” suffix and i don’t want it, Is it possible to delete this suffix ? I’m new on elixir.
Thx for the help Have a nice day
If it’s not clear i want this result when i run
mix phx.routes
Result wanted:
websocket WS /cable
NobbZ
3
Perhaps you can set the :websocket
s :path
option to /
instead of leaving it as its default.
https://hexdocs.pm/phoenix/Phoenix.Endpoint.html#socket/3-common-configuration
3 Likes