-
Notifications
You must be signed in to change notification settings - Fork 1
Home
In order to get started locally:
- Clone the repo:
git clone https://github.com/RiceAstroparticleLab/xenon-users-web.git - Add a
.envfile with all the required environmental variables - In order for the app to run,
MONGO_LOCAL_URI,DAQ_MONGO_URI,GITHUB_CLIENT_ID, andEXPRESS_SESSIONmust not be left blank. In order to log in, you must have at least created an OAuth app or created aGENERAL_LOGIN_PWinstead. - If running locally, the base url must be set to an empty string (
BASE_URL=""). If running on LNGS machine, theBASE_URL="/shifts". This variable must be set to the correct value in both the.envfile andpublic/javascripts/directory_scripts.jsin order to have access to all necessary javascripts and functions. - From the root directory run
npm start - If running locally open
http://localhost:3000/in your browser. Otherwise, checkhttps://xenonnt.lngs.infn.it/shifts/and hope everything is right.
In the root directory, create a file called .env that contains the following values:
MONGO_LOCAL_URI=""
DAQ_MONGO_URI=""
CALLBACK_URL=""
GITHUB_CLIENT_ID=""
GITHUB_SECRET_KEY=""
SLACK_INVITE=""
NOTIFS_ACCOUNT=""
SMTP_HOST=""
SMTP_PORT=
CHRIS_EMAIL=""
CB_EMAIL=""
ZE_EMAIL=""
ADMIN_EMAIL=""
EXPRESS_SESSION=""
PERSONAL_ACCESS_TOKEN=""
LDAP_BIND_DN=""
LDAP_BIND_CREDENTIALS=""
LDAP_URI=""
GENERAL_LOGIN_PW=""
PORT=
ERROR_FILE=""
For more info on how to get the necessary values for these, please see the tab on Environmental Variables.
xenon-users-web/
├── bin/
├── config/
├── public/
│ ├── images/
│ ├── javascripts/
│ └── stylesheets/
├── routes/
└── views/
└── components/
The bin/ folder contains the www file which contains the startup scripts for the website. The config/ folder contains the file which configures all the different Passport.js strategies used as authentication for the website. The images/, javascripts/, and stylesheets contain all the static assets that are served through the express.static middleware. The routes/ folder contains different files that create routers as modules (mini-apps) which are then mounted on a path in the main app. The views/ folder contains all the EJS files with the HTML that gets rendered for each page. The components/ folder within it contains components which can be reused inside main pages by just including them wherever necessary using <% include components/XXXX %> where XXXX represents the name of the component. Beyond that, any other included file provides support for packages, choosing which files get pushed to GitHub (.gitignore) and the main app itself (app.js).