diff --git a/README.md b/README.md index 7512a7e..f6d8b8e 100644 --- a/README.md +++ b/README.md @@ -1 +1,57 @@ -npm start \ No newline at end of file +# Job Portal Website + +## Introduction + +This project is a job portal website that aims to connect job seekers with potential employers. It features job listings, user profiles, and company rankings, providing a comprehensive platform for job hunting and recruitment. + +## Running the Project Locally + +To run this project on your local machine, follow these steps: + +1. Clone the repository using the command `git clone [repository-url]`. +2. Navigate to the project directory and install dependencies by running `npm install`. +3. Start the server with `node server.js` or the equivalent command. +4. Ensure you have the prerequisites installed: Node.js, npm, and MongoDB. +5. Set up your environment variables according to the `.env.example` file provided. + +## Project Structure + +The project is structured as follows: + +- `server.js`: The entry point of the application that initializes the server. +- `routes/`: Contains all the route definitions for the application. +- `models/`: Houses the Mongoose models for user profiles, job listings, and company rankings. +- `public/`: Contains static files like HTML, CSS, and client-side JavaScript. +- `views/`: Stores the EJS templates for rendering dynamic content. +- `config/`: Includes configuration files for the database and other services. + +This structure facilitates the interaction between the client-side components (HTML, CSS, JavaScript) and the server-side logic. + +## Usage + +To use the website: + +- Navigate to the homepage to view the latest job listings. +- Sign up or log in to create a user profile and apply for jobs. +- Access the company rankings to see top-rated employers. + +## Technologies Used + +- HTML +- CSS +- JavaScript +- Node.js +- Express +- MongoDB + +## External Resources + +For further understanding or extending the project, you might find the following resources helpful: + +- [Node.js Documentation](https://nodejs.org/en/docs/) +- [Express Documentation](https://expressjs.com/en/4x/api.html) +- [MongoDB Setup Guide](https://docs.mongodb.com/manual/installation/) + +## Contact Information + +For support or inquiries, please reach out to the maintainers at [contact@example.com](mailto:contact@example.com). \ No newline at end of file diff --git a/job-posting.html b/job-posting.html index e99c540..6e8eb05 100644 --- a/job-posting.html +++ b/job-posting.html @@ -5,11 +5,12 @@ Post a Job - True Up - +

Post a Job

+

For more information on project setup and execution, please see the README.md.

@@ -39,7 +40,6 @@

Post a Job

- + + - - + \ No newline at end of file diff --git a/server.js b/server.js index 6b10695..2bb62ba 100644 --- a/server.js +++ b/server.js @@ -10,6 +10,7 @@ const PORT = process.env.PORT || 3000; const authRoutes = require('./routes/authRoutes'); const jobRoutes = require('./routes/jobRoutes'); +const authMiddleware = require('./routes/middleware/authMiddleware'); mongoose.connect(process.env.DB_CONNECTION_STRING, { useNewUrlParser: true, @@ -32,6 +33,7 @@ app.set('view engine', 'ejs'); app.use(authRoutes); app.use(jobRoutes); +app.use(authMiddleware); app.use((err, req, res, next) => { console.error(err.stack); @@ -41,3 +43,4 @@ app.use((err, req, res, next) => { app.listen(PORT, () => { console.log(`Server is running on http://localhost:${PORT}`); }); +``` \ No newline at end of file