-
Notifications
You must be signed in to change notification settings - Fork 1
Environmental Variables
The following variables are all required in order for the website to function properly. I will give a quick explanation of what they are and how to get them.
All environmental variables of the type String should have the following format in the .env file: VAR_NAME="examplestring".
All environmental variables of the type Integer should have the following format in the .env file: VAR_NAME=000
MONGO_LOCAL_URI: a String with the URI I personally used for testing and caching Express sessions. This is a string that links to my personal MongoDB collections. You will need to create your own MongoDB cluster and add your URI here.
DAQ_MONGO_URI: a String with the URI to the DAQ MongoDB used for most of the process. Get this from Chris. Alternatively if you intend on running the program locally, just add your own MongoDB URI while running locally.
For more info on how this works and what it is see: https://www.passportjs.org/packages/passport-ldapauth/
LDAP_BIND_DN: a String
LDAP_BIND_CREDENTIALS: a String
LDAP_URI: a String
You should be able to get all of these from Chris or Darryl.
For more information on how this works and what it is see: https://www.passportjs.org/packages/passport-github2/
This requires you to create an OAuth app.
- Note: For this app, enable device flow is not necessary. Your callback URL should go to
/auth/github/callback
CALLBACK_URL: a String with the callback URL
GITHUB_CLIENT_ID: a String with the Github Client ID
GITHUB_SECRET_KEY: a String with the Github secret key
For more information on how this works and what it is see: https://www.passportjs.org/packages/passport-local/
GENERAL_LOGIN_PW: a String with the general login password
Read more about how express sessions work: http://expressjs.com/en/resources/middleware/session.html
EXPRESS_SESSION: a String with a secret key that is generated by you. Make it secure.
To learn more about Nodemailer and its features: https://nodemailer.com/about/
NOTIFS_ACCOUNT: a String with the name of the account that sends the emails. Get this from Chris.
SMTP_HOST: a String with the host name. Get this from Chris.
SMTP_PORT: an Integer with the SMTP port. Get this from Chris.
The following are all emails that are used to send out notifications from the website. If you'd like to use them to test, set these all to your preferred testing email. Otherwise, make sure you have the right emails. These are important. Get them from Chris.
CHRIS_EMAIL: a String with Chris's email.
CB_EMAIL: a String with the collaboration group email.
ZE_EMAIL: a String with Ze's email.
ADMIN_EMAIL: a String with the admin group email.
PERSONAL_ACCESS_TOKEN: a String with the personal access token needed to access account information using octokit. I followed this guide to create mine: https://dev.to/gr2m/github-api-authentication-personal-access-tokens-53kd
SLACK_INVITE: a String with a link to a XENON slack invite. Ask Chris.
PORT: an Integer with the port that the web app will be on. Ask Chris.
ERROR_FILE: a String with the name of file that errors will get written to. Example: error.txt