Skip to content

addzz24/blog-platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blog Platform

A Node.js-based blogging platform with full CRUD functionality, user authentication, comments, and post management.


🚀 Features

  • User registration & authentication (sessions or JWT)
  • Create, read, update, delete (CRUD) blog posts
  • Add and manage comments on posts
  • Fetch posts and comments by ID
  • Clean project structure (configs, middleware, models, routes, services)
  • Ready for future enhancements like templating or frontend integration

📂 Project Structure

blog-platform/
├── configs/ # Configuration files (DB, environment)
├── middleware/ # Authentication, error handling, etc.
├── models/ # Data models (Posts, Users, Comments)
├── routes/ # API endpoints
├── services/ # Business logic & utilities
├── app.js # Entry point / server setup
├── index.js # Application bootstrap
├── package.json # Project metadata
└── README.md # Project documentation

🛠️ Getting Started

  1. Clone the repository
    git clone https://github.com/addzz24/blog-platform.git
    cd blog-platform
  2. Install dependencies
    npm install
  3. Set up environment variables (Create New .env file in your root directory)
     PORT=3000
     DATABASE_URL=your_database_url
     JWT_SECRET=your_secret
  4. Run the server
  Run the server
  npm start

The server should now be running at http://localhost:3000


📂 .env example

  1. Server configuration PORT=3000

  2. Database connection DATABASE_URL=postgres://user:password@localhost:5432/blogdb

  3. JWT secret for authentication JWT_SECRET=supersecretkey


📖 Usage

  • Register and authenticate users

  • Create, update, and delete posts

  • Add and manage comments

  • Query posts and comments by ID

About

This is a Node.js application for a blog platform that provides robust functionality for managing blog posts, comments, and user authentication. It supports CRUD operations for posts and comments, user registration, authentication, and retrieval of posts and comments by their IDs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors