blog/backend
SquidSpirit 24a98f8f70
All checks were successful
Frontend CI / build (push) Successful in 6m14s
BLOG-126 Post management (list and create) (#139)
### Description

- As the title

### Package Changes

_No response_

### Screenshots

|Scenario|Screenshot|
|-|-|
|Posts list|![截圖 2025-10-15 凌晨4.09.28.png](/attachments/c8ad41e8-1065-4249-90e3-977bd36031e8)|
|Empty input|![截圖 2025-10-15 凌晨4.10.12.png](/attachments/c902fdc0-4287-4b5d-9b9e-63dd6a5604a6)|
|Pattern not matched|![截圖 2025-10-15 凌晨4.11.05.png](/attachments/88e4fb1d-6a69-4305-a94c-bd48982bb8a5)|

### Reference

Resolve #126.

### Checklist

- [x] A milestone is set
- [x] The related issuse has been linked to this branch

Reviewed-on: #139
Co-authored-by: SquidSpirit <squid@squidspirit.com>
Co-committed-by: SquidSpirit <squid@squidspirit.com>
2025-10-15 04:21:13 +08:00
..

Backend

Development

SQL Migration

  1. Install sqlx

    cargo install sqlx-cli
    
  2. Run migration

    sqlx migrate run
    

Run Project

  1. Prepare for sql schema setup

    cargo sqlx prepare --workspace
    
  2. Run the server

    RUST_LOG=debug cargo run
    
  3. (Optional) Hot restart

    1. Install watchexec

    2. Run the server with watchexec

      RUST_LOG=debug watchexec -e rs -r 'cargo run'