umts / BusInfoBoard

A place to view bus arrival information from Avail's JSON feed
Apache License 2.0
16 stars 3 forks source link

Configuration source #16

Closed werebus closed 9 years ago

werebus commented 9 years ago

As the feature requests continue to roll in, the query string is looking less and less like the best configuration method out there. Two thoughts:

  1. I'm trying to think of a nice way to put configuration in some sort of structured file (e.g. JSON) This wouldn't be a change, just an additional configuration method. @bcspragu actually suggested something like this at the outset, and I resisted it, because it would involve running some sort of server somewhere, which we've managed to avoid heretofore. On the plus side, it could be something as uncomplicated as a flat HTTP server, or as complicated as a web app that dynamically changes configuration based on any logic we (or some other agency) want(s). I dunno, maybe not worth it :confused:
  2. Configuration values that are agency-wide (like what hour of the day we switch over) are probably best put in constants in the JS. We already do that for the API server location, for example.
bcspragu commented 9 years ago

I think another option to explore would be a command line tool that generates our JS, and perhaps HTML files for you. You specify the options as command line flags, or it could be an interactive prompt, and it gives you a ready made Web page to deploy. The con of this is that we can't host ours from Github anymore, at least not the same repo.

sherson commented 9 years ago

Very cool, thanks.