A RESTful API for a blogging platform built with Node.js, MongoDB, and Passport.js. It supports user authentication, blog creation, management, and discovery.
- Sign up with
first_name,last_name,email, andpassword - Sign in with
emailandpassword - Authentication handled with Passport + JWT (token expires in 1 hour)
- All users (logged in or not) can:
- View a paginated list of published blogs
- View individual published blog posts (read count increases automatically)
- Blogs are searchable by author, title, and tags
- Blogs are sortable by
read_count,reading_time, ortimestamp
- Blogs can be in either
draftorpublishedstate - Authenticated users can:
- Create blogs (default state:
draft) - Publish/unpublish their blogs
- Edit or delete their blogs
- View their blogs (filterable by state)
- Create blogs (default state:
Each blog includes:
title,description,tags,author,timestampstate,read_count,reading_time,body
- Node.js
- MongoDB Atlas (or local MongoDB)
# Clone the repository
git clone https://github.com/El-Gibbor/Blogging_API.git
# Navigate into the project folder
cd Blogging_API
# Install dependencies
npm install
# Run the server
node index.js