GitHunt
AB

Abhishek2010dev/Blog-Platform-API

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

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! ๐Ÿš€

Abhishek2010dev/Blog-Platform-API | GitHunt