Repo for hosting Letter of Recommendation Generator Capstone Project as of Fall 2021.
Team members:
- Natalie Pham – nqpham@usc.edu
- Skylar Kim – kimsooye@usc.edu
- Mohib Mirza – mohibmir@usc.edu
- Matthew Peng – mzpeng@usc.edu
- Alex Rouse - acrouse@usc.edu
- Enter letterOfRecGenerator folder
- Run
DEBUG=letterOfRecGenerator:* npm run devstart
(for debug on console) ornpm run dev
- Open up a browser tab to
127.0.0.1:3000
(make sure port 3000 was not already occupied) - Run
npm install
from\letterOfRecGenerator
and also specifically runnpm install docxtemplater
,npm install jszip2
andnpm install helmet
- Open up your browser, go to “https://localhost:443”
- Run
npm update
from\letterOfRecGenerator
Run npx kill-port 27017
to reset mongoDB
then run mongod
Windows, Mac and Linux:
- install Docker from https://www.docker.com/get-started (or you can use package manager to install docker)
- in terminal navigate to your git repo for this project
- run
docker build -t "your_name_for_this_image" .
- then, run
docker run -p 443:443 -p 27017:27017 -i -t your_name_for_this_image
- in your browser, navigate to https://localhost
Go to https://recommendation.usc.edu
Restarting/Starting Sessions (old)
- To restart/start mongod, attach to mongod session using the above command and run
mongod --port 12345
- To restart/start the project session, attach to the session using the above command and run
npm run devstart
For the last step, you may need to kill the previous process on port 3000 using the following steps:
- Run
sudo lsof -n -i :3000 | grep LISTEN
- Using the second number (the pid) in the result, run
kill ${PID}
Afterwards, test to see if the app is properly running by accessing 68.181.97.191/login
on your browser.
Currently, our app is hosted on a server with IP address 68.181.97.191 on port 3000, with the MongoDB instance on the same IP address but at port 12345.
Currently, the app will be run under docker container.
-
Go to this link and download the compressed files for your respective platform.
-
Extract the files from the downloaded archive.
On Mac, run:
tar -zxvf mongodb-osx-x86_64-enterprise-3.6.2.tgz
-
Copy the extracted archive to the target directory.
On Mac, run:
mkdir -p mongodb cp -R -n mongodb-osx-x86_64-enterprise-3.6.2/ mongodb
-
Ensure the location of the binaries is in the PATH variable.
Add the following line to
~/.bashrc
or~/.bash_profile
:export PATH=<mongodb-install-directory>/bin:$PATH
Then, run:
source ~/<.bashrc or .bash_profile>
-
Run MongoDB
-
Create the data directory.
This creates the default directory to which MongoDB will write data
sudo mkdir -p /data/db
-
Set permissions for the data directory.
MongoDB will need read and write permissions
sudo chmod 755 /data/db
-
Run the
mongod
process.If the locations of the MongoDB binaries has been added to the PATH variable, then run:
mongod
Otherwise, run:
<path to binary>/mongod
-
Verify that MongoDB has started successfully.
Check the process output for the following line:
[initandlisten] waiting for connections on port 27017
You should now be able to begin using MongoDB.
-