This is a full-featured blog website that allows users to register, log in, create posts, comment on posts, and view posts from other users. The backend is built with Node.js, and it uses JWT tokens for authentication and salted and hashed passwords for secure password storage.
- User authentication with JWT tokens
- Express-rate-limit is implemented to limit the number of requests a client can make .
- Secure password storage with salted and hashed passwords
- User registration and login
- Create, read, update, and delete (CRUD) operations for blog posts
- Commenting on posts
- Backend: Node.js
- Authentication: JWT (JSON Web Tokens)
- Password Security:Hashing
- Database: MongoDB
Create a .env
file in the root directory and add the following environment variables:
PORT=your_port
DB_URI=your_database_uri
JWT_SECRET=your_jwt_secret
- Clone the repository:
git clone https://github.com/alokranjan609/Blog-Nodejs.git
- Navigate to the project directory:
cd Blog-Nodejs
- Install the dependencies:
npm install
- Start the server:
npm run dev