This is a blog system developed using Node.js, Express, Passport, and MongoDB. The application allows users to create, read, update, and delete blog posts while managing user authentication.
- User authentication with Passport.js
- Create, edit, and delete blog posts
- View all blog posts
- Commenting feature
- Admin Privilegues
- Responsive design using Handlebars and CSS
- Node.js: JavaScript runtime for server-side programming
- Express: Web application framework for Node.js
- Passport: Middleware for authentication
- MongoDB: NoSQL database for storing blog posts and user data
- Handlebars: Templating engine for generating HTML views
- Node.js (v12 or higher)
- MongoDB installed locally or use a cloud instance (e.g., MongoDB Atlas)
- Clone the repository:
git clone https://github.com/Dadyze/BlogApp-in-NodeJS.git cd BlogApp-in-NodeJS
- Install the dependencies:
npm install
- Make sure that the connection string fields point to your MongoDB local or cloud instance in the configuration file.
- Start the application:
npm start
- Open your browser and navigate to http://localhost:3000.
Register a new user account to start creating blog posts. Use the navigation to view all blog posts or edit existing ones.
- app.js: Main application file where the server is set up.
- config/: Configuration files, including database connection settings.
- models/: Database models for MongoDB.
- routes/: Express routes for handling HTTP requests.
- views/: Handlebars templates for rendering the UI.
- public/: Static assets including CSS styles.
Contributions are welcome! Feel free to submit issues or pull requests if you have suggestions or improvements.
This application serves as a practical demonstration of building a full-stack web application using modern JavaScript technologies.