Backend for Jitheshraj Scholarship Portal Form.
- Clone the repository -
git clone <remote-url>
- Go to the project directory -
cd <cloned-repo>
- Install dependencies -
npm install
- Copy contents of
.env.example
to a new file.env
- Configure
PORT
,environment
andSECRET
variables - Set
DB_USERNAME
,DB_PASSWORD
andDB_URI
to your localhost mongodb credentials - Get and set
SENDGRID_API_KEY
to access application mailing routes API_BASE_URL = 'http://localhost:8000'
CLIENT_BASE_URL = 'http://localhost:3000'
- Set
BASE_DIR
andCLIENT_BASE_DIR
to your appropriate directories path to configure file uploads. - Set the
DATE
andYEAR
variables in their respective formats. You won't be able to access certain routes without this.
- Configure
- Copy contents of
src/config/google_auth_credentials.example.json
to a new filesrc/config/google_auth_credentials.json
and set all the parameters and configure accordingly in Google developer console to give Google Drive API upload/write access. - Copy contents of
src/config/mentorsList.example.json
to a new filesrc/config/mentorsList.json
and add all the mentors details. - Start
MongoDB
service -sudo service mongod start
- Start application and kue server -
node index
- Open a new terminal and start kue workers -
node /src/workers
- Instead, to start both servers and workers -
./run_server.sh
- Access kue API and dashboard from http://localhost at its configured port number. Or at http://localhost:5000/api and http://localhost:5000/kue respectively, by default.
- Install JSPF-Web if needed, from BharathKumarRavichandran/JSPF-Web
- If you face some version incompatability issues while installing/running, check your
node
andnpm
versions and ensure it is compatible with the project. (Tip: Use nvm :p) - If you face any mongo error, check whether
MongoDB
service (mongod daemon) is running. - If you're unable to generate PDFs, make sure your wkhtmltopdf rendering engine(QT) path is configured properly.