This is a simple web application for managing and displaying blog posts. It is built using Node.js, Express.js, MongoDB, and EJS templating engine. Users can view a list of blogs, read individual blog posts, and navigate through different pages of the application.
- Express.js: A web application framework for Node.js.
- Morgan: HTTP request logger middleware.
- Mongoose: MongoDB object modeling for Node.js.
- EJS: Embedded JavaScript templating.
- MongoDB: NoSQL database used for storing blog data.
-
Clone the repository:
git clone https://github.com/ArthurJuma98/Blog_Site_App.git
-
Navigate to the project folder:
cd Blog_Site_App
-
Install the dependencies:
npm install
-
Set up your MongoDB database and update the
dbURI
variable inapp.js
with your connection string. -
Start the application:
npm start
-
Open your browser and visit http://localhost:3000 to view the application.
- Visit http://localhost:3000 in your browser to access the home page with a list of blogs.
- Navigate through different pages of the application and read individual blog posts.
- Explore the about page to learn more about the application.
- The application uses Morgan for HTTP request logging.
- Static files (e.g., stylesheets, images) are served from the 'public' directory.
- Middleware logs information about each incoming request, such as the hostname, path, and HTTP method.
- The main application logic is organized into separate files. Blog-related routes are defined in
blogRoutes.js
. - Additional routes handle redirects and a custom 404 error page.
Feel free to contribute to this project by opening issues or submitting pull requests. Follow the guidelines in the CONTRIBUTING.md file.
This project is licensed under...