Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove process.ENV #11

Open
mwawrusch opened this issue Nov 2, 2012 · 0 comments
Open

Remove process.ENV #11

mwawrusch opened this issue Nov 2, 2012 · 0 comments

Comments

@mwawrusch
Copy link

This code block

  client_id: if process.env['CLIENT_ID']? then process.env['CLIENT_ID'] else 'CLIENT-ID'
  client_secret: if process.env['CLIENT_SECRET']? then process.env['CLIENT_SECRET'] else 'CLIENT-SECRET'
  callback_url: if process.env['CALLBACK_URL']? then process.env['CALLBACK_URL'] else 'CALLBACK-URL'
  redirect_uri: if process.env['REDIRECT_URI']? then process.env['REDIRECT_URI'] else 'REDIRECT_URI'
  access_token: if process.env['ACCESS_TOKEN']? then process.env['ACCESS_TOKEN'] else null

is really dangerous, as it can easily introduce side effects in larger apps. Best to remove it and pass this simply as an object. Most people will want to use something like nconf to read from a config file and set the the parameters accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant