Project New Citizen is a web application created for the Center for Employment Training Immigration and Citizenship Program (CET-ICP) in collaboration with Code for San Jose.
CET-ICP regularly holds workshops to help immigrants on their paths to become U.S. Citizens, but when they could no longer hold their in-person workshops due to COVID-19 they reached out to Code for San Jose to help move the workshop online.
The purpose of the project is to have users watch an informational video and answer a series of questions so that immigration attourneys and DOJ accredited representatives can help them become U.S. Citizens.
git clone https://github.com/noelsner/e-immigrate.git
Go to the project directory
cd e-immigrate
Install dependencies
npm install
In order to run mongoDB locally, you will need to have mongoDB installed in your device.
which mongo
Checks if you have mongoDB installed on your device. It should return a directory path like /usr/local/bin/mongo
. If it doesn't, you will need to install mongoDB on your device.
Installing MongoDB
In order to install mongoDB on you device, go to mongoDB manual and follow the instructions.
Connecting to MongoDB
After installing mongoDB, navigate to the backend
folder and create a .env
file
cd backend
touch .env
In the .env
file add the following:
MONGO_URI = mongodb://localhost/test
JWT_KEY = <secret key>
Note: The secret key
can be a "string, buffer, or object containing either the secret for HMAC algorithms or the PEM encoded private key for RSA and ECDSA".
For more information on jwt, visit JWT Documentation.
Note: test
in the line above is the name of the database that you want your application to connect to. You can choose your own name for the database.
Now, still in the backend
folder, run the following command in the terminal:
node index.js
or
nodemon index.js
You should see a response as shown below, if mongoDB is connected to your application.
listening on port 5000
MongoDB database connection established successfully
From the main project directory
npm run start
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
Drag and drop the updated Questionnaire for Upload.xlsx
and/or Website Content.xlsx
file(s) into the backend
folder
In the terminal, from the backend
folder, run the following command(s):
node uploadQuestionnaireFromExcel.js
node uploadTranslatedContentFromExcel.js