fac-14 / Vent-Bot

A friendly chatbot to offload stressful thoughts on
MIT License
3 stars 3 forks source link

Travis environment variable #60

Open jema28 opened 6 years ago

jema28 commented 6 years ago

What's happening in these three lines? https://github.com/fac-14/Vent-Bot/blob/master/src/controllers/routes/message.js#L1-L3

developess commented 6 years ago

Basically, we need to require env2 and specify the config file when running locally, but we don't want that happening in travis or in production (environment variables are set in other ways for them) so we have the environment variable TRAVIS on heroku and travis so that code doesn't run in production. We could have done the opposite logic which might have made more sense.