technoweenie/node-scoped-http-client

Environment variables for EXPRESS are not namespaced

stresler opened this issue · 1 comments

the Express instantiation in robot.coffee sources a few variables from the environment that aren't prefaced with the HUBOT_ prefix. This can easily lead to clashes with any other nodejs apps trying to source environment variables.

269   setupExpress: ->
270     user    = process.env.EXPRESS_USER
271     pass    = process.env.EXPRESS_PASSWORD
272     stat    = process.env.EXPRESS_STATIC

and then

291     try
292       @server = app.listen(process.env.PORT || 8080, process.env.BIND_ADDRESS || '0.0.0.0')

I noticed then when I was working on hubotio/hubot#727 where I am adding HUBOT_EXPRESS_KEY and HUBOT_EXPRESS_CERT

Let me know if this is the way you want to proceed and I can roll it all up here. Also if you want backward compatibility for any reason (e.g. accept PORT, but log a message to migrate to HUBOT_PORT

gah wrong project. I'm new to github. sorry.