Job API Server is a backend service that provides authentication and job management features using Node.js and Express. It follows best practices for security, validation, and API documentation.
- User authentication (Register, Login) with JWT.
- CRUD operations for job listings.
- Security measures: rate limiting, helmet, CORS, and XSS protection.
- API documentation with Swagger.
- MongoDB integration using Mongoose.
- Backend: Node.js, Express
4.21.1 - Database: MongoDB, Mongoose
8.7.3 - Security: Helmet
8.0.0, Express Rate Limit7.4.1, XSS-Clean0.1.4 - Auth: JWT
9.0.2, BcryptJS2.4.3 - API Documentation: Swagger-UI-Express
5.0.1, YAMLJS0.3.0
git clone https://github.com/MF-Vv/job-api-server.git
cd job-api-servernpm installPORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_key
TEST_USER_ID=your_user_idnpm startServer will be running at http://localhost:5000
npm run devPOST /api/v1/auth/registerRequest Body:
{
"name": "example",
"email": "example@example.com",
"password": "example@password"
}POST /api/v1/auth/loginRequest Body:
{
"email": "example@example.com",
"password": "example@password"
}GET /api/v1/jobsGET /api/v1/jobs/{id}POST /api/v1/jobsRequest Body:
{
"company": "Tesla",
"position": "Intern"
}PATCH /api/v1/jobs/{id}Request Body:
{
"company": "Microsoft",
"position": "Internship Junior"
}DELETE /api/v1/jobs/{id}- JWT-based authentication
- Secure routes require
Authorization: Bearer <token>
This API is deployed on Render:
https://job-api-server.onrender.com/api-docs
🚨 Free-tier Limitation: Since this API is hosted on a free account, the server may spin down due to inactivity, causing delays of up to 50 seconds when handling requests.