rchain-community / rgov

RChain liquid democracy demo: capability sharing, mailbox, directory, chat, ...
https://rchain-community.github.io/rgov/
10 stars 14 forks source link

Participate.js should read the config files for master URI #187

Open Bill-Kunj opened 3 years ago

Bill-Kunj commented 3 years ago

Yes, a configuration file would be appropriate.

Note that a configuration file doesn't get imported. import is for source code; i.e. design-time materials.

A configuration file would get read in at runtime.

(Another alternative would be an environment variable, as advocated by https://12factor.net/config )

Originally posted by @dckc in https://github.com/rchain-community/rgov/issues/185#issuecomment-853575240

Bill-Kunj commented 3 years ago

@jimscarver Has this been addressed for the purposes of rv2021?

David405 commented 3 years ago

@Bill-Kunj does hardcoding the values work?

Bill-Kunj commented 3 years ago

@Bill-Kunj does hardcoding the values work?

@David405 I don't think so. @jimscarver What do we need for rv2021?

Bill-Kunj commented 3 years ago

@Bill-Kunj does hardcoding the values work?

@David405 I don't think so. @jimscarver What do we need for rv2021?

@dckc Please confirm that I am correct that hard-coding is not the solution here?

dckc commented 3 years ago

I agree: the master URI is not a design-time constant -- it changes at runtime depending on the chain -- so it doesn't belong in the source code.

jimscarver commented 3 years ago

the legacy code hard codes the uri's but that not how we want to do it. For 2021 if it works this week with the uris hard coded that is good enough. Taking the uris out of the code is the priority once it works at all.