This repository contains the backend code for a job portal website written in Node.js. This backend provides functionality for user authentication, CRUD operations for jobs, and features for searching and sorting jobs.
- User Authentication: Users can register and login to the system securely.
- Job CRUD Operations: Users can create, read, update, and delete job listings.
- Search Jobs: Users can search for specific jobs based on various criteria.
- Sort Jobs: Users can sort job listings based on different parameters such as date posted, job title, etc.
- Node.js: Backend server runtime environment.
- Express.js: Web application framework for Node.js used for routing.
- MongoDB: NoSQL database for storing job data.
- JWT (JSON Web Tokens): Used for user authentication and authorization.
- Mongoose: Object Data Modeling (ODM) library for MongoDB and Node.js.
- bcrypt: Library for hashing passwords for secure storage.
- Other dependencies: Refer to
package.jsonfor a full list of dependencies.
To get started with this project, follow these steps:
-
Clone the repository:
git clone https://github.com/aayushdebugging/job-portal-backend.git
-
Install dependencies:
cd job-portal-backend npm install -
Set up environment variables:
Create a
.envfile in the root directory and provide the following variables:PORT=3000 MONGODB_URI=your-mongodb-connection-string JWT_SECRET=DDBIFUGFUIWFBIUGFIUBF%@&$1234 -
Run the server:
npm start
-
Testing the APIs:
Use tools like Postman or curl to test the APIs. The API documentation can be found at
/api-docs.
API documentation is generated using Swagger. Once the server is running, you can access the documentation at http://localhost:3000/api-docs.
If you want to contribute to this project, please follow these guidelines:
- Fork the repository.
- Create your feature branch (
git checkout -b feature/your-feature). - Commit your changes (
git commit -am 'Add some feature'). - Push to the branch (
git push origin feature/your-feature). - Create a new Pull Request.
This project is licensed under the MIT License