The Northwind application powered by Rust (actix-web, sqlx, jwt...)
Generated from actix-sqlx-boilerplate
If you're using this repository for your samples, workshop, your project or whatever, please give a star ⭐. Thank you very much 👍
$ docker-compose up
$ cargo run --bin northwind-actix
Then play around with restclient.http
sqlx repository: Github
sqlx-cli repository: Github
$ cargo install sqlx-cli --no-default-features --features postgres
On windows 10
Make sure that you have docker-compose up
running with at least postgresdb
$ cargo clean
$ cmd /c "set SQLX_OFFLINE=true && cargo sqlx prepare -- --manifest-path apps/actix/Cargo.toml --bin northwind-actix"
Make sure, we have sqlx-data.json
updated. Then, we can build the buildpack below
The issue couldn't run cargo sqlx
cli successfully at launchbadge/sqlx#788
To create a migration:
$ sqlx migrate add -r <name>
Run migrations:
$ sqlx migrate run
Revet migrations:
$ sqlx migrate revert
Usage:
$ cargo watch -x 'run --bin api'
Use Drill
$ drill --benchmark drill.yml --stats --quiet
Run:
$ cargo doc --open --no-deps
Run with private items:
$ cargo doc --open --no-deps --document-private-items
$ pack build vietnamdevsgroup/northwind-rs -e SQLX_OFFLINE=true -e BP_CARGO_INSTALL_ARGS="--path=./apps/actix"
-b docker.io/paketocommunity/rust
Un-comment section northwindrs
in docker-compose.yaml
file, then run:
$ docker-compose up
$ docker run -it --entrypoint /bin/bash vietnamdevsgroup/northwind-rs
$ docker pull wagoodman/dive:latest
$ docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock wagoodman/dive:latest vietnamdevsgroup/northwind-rs