This is a blog application built with Node.js, Express.js, EJS, and JWT authentication. It allows users to create, read, update, and delete blog posts securely.
- User authentication using JSON Web Tokens (JWT)
- Create, read, update, and delete blog posts
- View and comment on blog posts
- Admin dashboard for managing posts and users
- Responsive design for mobile and desktop
-
Clone the repository:
git clone https://github.com/tarun2001jawla/nodejs-blog-app.git
2.Install dependencies:
cd nodejs-blog-app npm install
3.Configure environment variables:
Create a .env file in the root directory and add the following variables: PORT=3000 DB_URI=mongodb://localhost:27017/blogapp JWT_SECRET=your_jwt_secret
4.Start the server: npm start
Usage Register a new account or login if you already have one. Create, edit, or delete your blog posts. View and comment on other users' blog posts. Admins can manage users and posts from the admin dashboard.
Technologies Used Node.js Express.js EJS (Embedded JavaScript) MongoDB (with Mongoose) JSON Web Tokens (JWT) for authentication License This project is licensed under the MIT License.
Contributing Contributions are welcome! Please fork the repository and create a pull request with your changes.
Contact For inquiries, please contact : tarunjawla2@gmail.com.