Skip to content

Changing endpoint dynamically. OR Re-instantiating asteroid object #127

@AayushShrestha

Description

@AayushShrestha

I want to dynamically change the endpoint of asteroid object being used to switch between different servers (viz dev, staging, production). What would be the recommended way to do that?
I realized that just changing the endpoint will not work.
I have been able to make it work by simply creating a new asteroid object with the new endpoint and replacing with the one being used and then re-instantiating all the listeners. But I wanted to know if there is a better, cleaner way of doing it.
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions