This is frontend repo for DormSoup. For privacy reasons, only authenticated MIT students could visit the website.
The project structure should be:
- DormSoup
- dormsoup
- (other files)
- .env (ask andiliu for the file)
- public/fonts (ask andiliu for the file)
- dormsoup-daemon
- dormsoup
After we put your keys in authorized_keys in the server, you put this in your local .ssh/config:
Host DormSoup
HostName dormdigest.mit.edu
User dormsoup
SetEnv GIT_AUTHOR_NAME="YOUR_NAME_HERE" GIT_AUTHOR_EMAIL=YOUR_EMAIL_HERE
ForwardAgent yes
IdentityFile ~/.ssh/id_rsa_dormsoupwhere YOUR_NAME_HERE and YOUR_EMAIL_HERE are the name and email you want to use.
Then cd into dormsoup to run npm install to install the dependencies.
First start the ssh connection to forward the local 5432 port to the DormSoup database:
ssh DormSoup -L 5432:localhost:5432Important note: Even though it says localhost, the database is on the server, not on your computer. Be careful with any destructive actions. (Check the daemon repo for instructions of setting up a local development database.)
You can read https://stackoverflow.com/questions/5280827/can-someone-explain-ssh-tunnel-in-a-simple-way for an explanation about port forwarding, or you could find other results on the web or maybe even on man ssh.
Then (on a different tab) run npm run dev at the DormSoup/dormsoup root folder, go to http://localhost:3000 to checkout the website.
- If getting
public key deniedduringssh, check if you correctly capitalizedDormSoup - If the website keeps loading after
npm run dev, check the dev console for errors. It is possible that the connection to database is not setup correctly possibly due to incorrect.envfiles- Same if you see a page asking you to sign in. Sign-in should happen automatically, but the if
.envfile is not configured correctly, then auth won't work
- Same if you see a page asking you to sign in. Sign-in should happen automatically, but the if
- If some icons are not correctly loading after
npm run dev, you need to get thepublic/fontsfiles from andiliu
- Open new branches and PR while developing
