This is the backend for the JobTrackr application. It provides the necessary API endpoints for user authentication and job tracking. The server is hosted on render.
- User authentication with JWT tokens.
- API endpoints for job tracking.
- MongoDB database integration.
- Node.js
- Express.js
- MongoDB
- JWT for authentication
- Other dependencies (see
package.json
)
- Node.js installed
- MongoDB database (local or cloud) and its connection URI
-
Clone the repository:
git clone https://github.com/ggrewal99/JobTrackr-backend.git
-
Install dependencies:
cd JobTrackr-backend npm install
-
Create a .env file in the project root and add the following:
MONGO_URI=your-mongo-db-connection-uri
To start the server, run the following command in your terminal:
npm start
-
Register User
POST /api/v1/auth/register
: Register a new user.
-
Login User
POST /api/v1/auth/login
: Log in an existing user.
-
Get All Jobs
GET /api/v1/jobs
: Retrieve all jobs for the authenticated user.
-
Get Specific Job
GET /api/v1/jobs/:id
: Retrieve details for a specific job.
-
Add New Job
POST /api/v1/jobs
: Add a new job.
-
Update Job
PATCH /api/v1/jobs/:id
: Update details for a specific job.
-
Delete Job
DELETE /api/v1/jobs/:id
: Delete a specific job.
authentication
: Middleware for authenticating users using JWT.
not-found
: Handles requests to undefined routes.error-handler
: Centralized error handling middleware.