BRL-CAD

[Move SMTP credentials into a settings.json file for Online Geometry Viewer project

Online Geometry Viewer is a web based model viewer built in meteor. https://github.com/BRL-CAD/OGV-meteor

In the file https://github.com/BRL-CAD/OGV-meteor/blob/development/imports/startup/server/smtp.js line number 29 - 34 contains smtp settings. SMTP settings are used to send email notifications to user. This block of code has smtp settings hardcoded, which is a not a good coding practice. Better way would be to move all these smtp settings into a separate file settings.json.

Steps 1) Download/clone the code of OGV https://github.com/BRL-CAD/OGV-meteor 2) Set up your local environment using it's readme file (there's a GCI task for this) 3)Read this short tutorial about using settings.json in meteor https://themeteorchef.com/tutorials/making-use-of-settings-json 4) Move smtp settings that are at https://github.com/BRL-CAD/OGV-meteor/blob/development/imports/startup/server/smtp.js to a settings.json file in root of meteor.

5) OPTIONAL: can you find one more place in the code where moving some variables to settings.json would be helpful?

P.S don't forget to have fun!

SUBMIT your changes to the repository as a pull request

Task tags

  • javascript
  • optimization
  • learning
  • meteor

Students who completed this task

Jeff Sieu

Task type

  • code Code
  • web Design
close

2017