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.exampleto a new file.env- Configure
PORT,environmentandSECRETvariables - Set
DB_USERNAME,DB_PASSWORDandDB_URIto your localhost mongodb credentials - Get and set
SENDGRID_API_KEYto access application mailing routes API_BASE_URL = 'http://localhost:8000'CLIENT_BASE_URL = 'http://localhost:3000'- Set
BASE_DIRandCLIENT_BASE_DIRto your appropriate directories path to configure file uploads. - Set the
DATEandYEARvariables 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.jsonto a new filesrc/config/google_auth_credentials.jsonand 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.jsonto a new filesrc/config/mentorsList.jsonand add all the mentors details. - Start
MongoDBservice -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
nodeandnpmversions and ensure it is compatible with the project. (Tip: Use nvm :p) - If you face any mongo error, check whether
MongoDBservice (mongod daemon) is running. - If you're unable to generate PDFs, make sure your wkhtmltopdf rendering engine(QT) path is configured properly.