Skip to content

Inherit host & protocol from endpoint #6

@simonewebdesign

Description

@simonewebdesign

Hi, we just integrated elm-phoenix-socket yesterday without any issues :)

Is it possible to inherit host and protocol from socketServer? E.g.:

initPhxSocket : Phoenix.Socket.Socket Msg
initPhxSocket =
    let
        socketServer = "ws://localhost:30000/broker/private/websocket?token=123"
    in
        Phoenix.Socket.init socketServer

Would it be possible to omit the first part, so that this would work too:

socketServer = "/broker/private/websocket?token=123"

Phoenix.js does that, and the advantage for us is that we don't need to do any crazy things to change the endpoint depending on the environment.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions