centrifugal / centrifuge-dart

Dart (Flutter) client SDK for bidirectional communication with Centrifugo and Centrifuge-based server over WebSocket
https://pub.dartlang.org/packages/centrifuge
MIT License
102 stars 29 forks source link

Get Domain via config file, to enable cross device testing. #13

Closed ghost closed 5 years ago

ghost commented 5 years ago

To make cross device testing easier can we change how we set the domain used.

its here at: https://github.com/centrifugal/centrifuge-dart/blob/master/example/flutter_app/lib/main.dart#L41

Suggest easiest for now is an asset file with a config in it that we read at startup. Just as here: https://pub.dartlang.org/packages/global_configuration#pubspec.yaml

Then you can just drop in whichever config you need with the "domain" For example i am using ngrok to make all devices be able to see the server locally, but also so that i can eavesdrop the connection easily to help debug.

Is this ok with everyone ?

mogol commented 5 years ago

Hi @gedw99 Not sure what is the ask?

You are able to implement in many different ways how to setup configs.

ghost commented 5 years ago

hey, Well i wanted to check this is cool with everyone. I prefer to do this here than in a fork and so it affects everyone. Am on gitter if you need to chat.

FZambia commented 5 years ago

Closing as no activity and the idea introduced here is not obvious for us. The library provides config so users can do whatever they want to properly set config values.