Winston icon indicating copy to clipboard operation
Winston copied to clipboard

Add environment variable configuration of the classtime endpoint

Open rosshamish opened this issue 10 years ago • 1 comments

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 avatar Mar 25 '15 01:03 rosshamish

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).

rosshamish avatar Jun 28 '15 02:06 rosshamish