centrifugal / centrifuge-dart

Dart (Flutter) client SDK for bidirectional communication with Centrifugo and Centrifuge-based server over WebSocket

Home Page:https://pub.dartlang.org/packages/centrifuge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

opened this issue · comments

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 ?

Hi @gedw99
Not sure what is the ask?

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

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.

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.