- "express"
- "cors"
- "bcrypt"
- "dotenv"
- "jsonwebtoken"
- "mongoose"
- "cookie-parser"
- "multer"
- "fs"
This blogging platform is built using Node.js and Express, with MongoDB as the database. It includes user authentication, blog creation, and various features for managing posts.
- Install dependencies:
npm install
- Create a .env file and set the following variables:
JWT_SECRET=your_jwt_secret
MONGODB_URL=MongoDB-Connection-String
- Install nodemon depandency
npm i -g nodemon
- Start the server:
nodemon ./index.js
- Server Started
Server Listening At Port 8000
Register a new user.
Log in and receive a JSON Web Token (JWT) for authentication.
Retrieve user profile information.
Log out and clear the authentication token.
Create a new blog post.
Retrieve a list of the latest blog posts.
Retrieve a specific blog post by its ID.
Update an existing blog post.