blog/backend
SquidSpirit 513e07b46a
Some checks failed
Frontend CI / build (push) Has been cancelled
BLOG-85 init: auth crate
2025-07-28 09:49:22 +08:00
..
2025-07-28 09:49:22 +08:00
2025-07-28 09:49:22 +08:00
2025-07-28 09:49:22 +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'