Backend RESTful API for jobs built in Node.js using Express.js & MongoDB
Visit https://job-app-api-chriscupas.vercel.app/
You need to install atleast version 16.15 on your local machine.
Install Dependencies
npm installStart the app
npm startPull the image
docker pull chriscupas/job-appRun docker
docker run -d --env-file ./config/config.env -p 3000:3000 chriscupas/job-appor
Run docker but make sure to use dotenv to fix environment dependencies
dotenv -- bash -c 'docker run -d --env-file ./config/config.env -p 3000:3000 chriscupas/job-app'Pull the source code then :
Build the Dockerfile
docker build -t job_app_api:0.0.1 .Run docker
docker run -d --env-file ./config/config.env -p 3000:3000 job_app_api:0.0.1Replace all environment variable values with yours.
| ENV | Description | Option |
|---|---|---|
| PORT | Node port | 3000 |
| NODE_ENV | environment | prod / dev |
| API_ROUTE_V1 | API route | /api/v1 |
| DB_LOCAL_URI | MongoDB Local URI | Info |
| DB_URI | MongoDB URI | Info |
| GEOCODER_PROVIDER | Geocoder | Info |
| GEOCODER_API_KEY | Geocoder | Info |
| JWT_SECRET | Secret key | your defined key |
| JWT_EXPIRES_TIME | Expire time | e.g. 7d |
| COOKIE_EXPIRES_TIME | Cookie exp time | e.g. 7 |
| SMTP_HOST | SMTP HOST | |
| SMTP_PORT | SMTP PORT | |
| SMTP_EMAIL | SMTP USER | |
| SMTP_PASSWORD | SMTP PASSWORD | |
| SMTP_FROM_EMAIL | SMTP FROM EMAIL | |
| SMTP_FROM_NAME | SMTP FROM NAME | |
| MAX_FILE_SIZE | FILE SIZE | e.g. 2000000 |
| UPLOAD_PATH | UPLOAD PATH | e.g. ./public/uploads |