title |
---|
ax system |
An Chat And Post System based on Rust and Postgres.
The previous project was Crab Rocket
- !!! This README is not updated for sqlx.
- !!! This README is not updated for distribute system.
- Apps
- 🧩 Project Dependencies
- Demo
- ⚙️ Requirements
- 🎃 Quick Start
- Migrations
- 🔧 Compile Release Version
- Design
- Rust
- Postgresql16
- Redis
- Actix-Web
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
brew install postgresql@16
brew install redis
cargo install diesel_cli --no-default-features --features postgres
git clone git@github.com:desonglll/ax.git && cd ax
cargo install
cd backend/query
export DATABASE_URL=postgres://localhost:5432/hello_rocket
diesel setup && diesel database reset
cd ../..
cargo run
export DATABASE_URL=postgres://localhost:5432/hello_rocket
brew install sqlx-cli
source .env
cd tweet_server
sqlx database create
sqlx database drop
# Creates a new file in `migrations/<timestamp>-<name>.sql`.
# Add your database schema changes to this new file.
sqlx migrate add -r <name>
sqlx migrate run
sqlx migrate info --source ../relative/migrations
sqlx migrate revert
# Run the server
cd ax
cargo run --bin tweet_service
cargo build --release
cargo install --path .
Set the environment variable:
export DATABASE_URL=postgres://@localhost/hello_rocket
Alternatively, update the .env
file in the project root.
diesel database reset
ax