ahoskins / Winston

an AngularJS schedule builder for UAlberta students
GNU Affero General Public License v3.0
21 stars 1 forks source link

Add environment variable configuration of the classtime endpoint #25

Open rosshamish opened 9 years ago

rosshamish commented 9 years ago

While we're at it, add env variable configuration of the API version too.

GET $CLASSTIME_URI/api/$CLASSTIME_VERSION/generate-schedules?q=...

This will be great for local debugging and also for testing in the staging environments.

rosshamish commented 9 years ago

Since the winston backend is nodejs, process.env will be useful: http://stackoverflow.com/questions/15058954/node-js-is-there-any-documentation-about-the-process-env-variable

There should be sensible defaults, like CLASSTIME_URI=http://classtime.herokuapp.com and CLASSTIME_VERSION=1

This'll be nice for local debugging since we can test with CLASSTIME_URI=http://localhost:5000 or something (while running classtime locally at port 5000).