DormSoup / dormsoup

MIT License
3 stars 2 forks source link

DormSoup

This is frontend repo for DormSoup. For privacy reasons, only authenticated MIT students could visit the website.

Directory Structure

The project structure should be:

Setting up for developing locally

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_dormsoup

where 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.

Developing locally

First start the ssh connection to forward the local 5432 port to the DormSoup database:

ssh DormSoup -L 5432:localhost:5432

Important 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.)

port forwarding diagram

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.

Common issues

Developing practices