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