A simple blog application built with Node.js, Express, MongoDB, and EJS.
This project allows users to create, read, update, and delete blog posts with an admin dashboard and user authentication.
- 📝 Create new blog posts
- ✏️ Edit and delete existing posts
- 🏠 View all posts on the home page
- 🔍 Search functionality
- 🎨 Responsive UI with EJS templates
- 🗄️ MongoDB database integration
- 👥 Separate pages for Admin and User
- 📊 Admin dashboard
- 🔑 User authentication with JWT & Auth Middleware
- 🍪 Cookies & session handling
- 🔒 Password hashing for security
- Backend: Node.js, Express.js
- Frontend: EJS, CSS
- Database: MongoDB (Atlas)
- Other Tools: dotenv, nodemon
git clone https://github.com/irfad-c/node-express-blog.git
cd node-express-blog
npm install
Create a .env file in the root folder and add:
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_key
PORT=5000
npm run dev