Skip to content

A high-performance, Rust-based blogging platform API built using Axum, SQLx, and Tokio with PostgreSQL as the database.

Notifications You must be signed in to change notification settings

Abhishek2010dev/Blog-Platform-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blog Platform API

A high-performance, Rust-based blogging platform API built using Axum, SQLx, and Tokio with PostgreSQL as the database.

🚀 Features

  • Create, read, update, delete (CRUD) blog posts
  • Search blog posts by title, content, or tags
  • Fast and scalable with Axum
  • Asynchronous database operations with SQLx
  • Structured logging with Tower

🛠️ Tech Stack

  • Language: Rust 🦀
  • Frameworks & Libraries: Axum, SQLx, Tokio
  • Database: PostgreSQL

📌 API Endpoints

Method Endpoint Description
GET / Welcome message
POST /posts Create a new blog post
GET /posts Retrieve all blog posts
GET /posts/search?term= Search blog posts by a keyword
GET /posts/{id} Retrieve a blog post by ID
PUT /posts/{id} Update a blog post by ID
DELETE /posts/{id} Delete a blog post by ID

🏗️ Setup

1️⃣ Prerequisites

2️⃣ Clone the Repository

git clone https://github.com/Abhishek2010DevSingh/Blog-Platform-API
cd blog-platform-api

3️⃣ Configure Environment

Create a .env file and set up the database URL:

DATABASE_URL=postgres://user:password@localhost/blog_db

4️⃣ Run Migrations

sqlx database create
sqlx migrate run

5️⃣ Start the Server

cargo run

The API will be available at http://localhost:3000.

📖 Inspiration

This project is inspired by the Blogging Platform API roadmap.


This README keeps it clean, informative, and professional. Let me know if you want modifications! 🚀

About

A high-performance, Rust-based blogging platform API built using Axum, SQLx, and Tokio with PostgreSQL as the database.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages