ngjupeng/poc

★ 0Forks 1RustGitHub ↗Compare

README

Rus App Name API

Docker Postgres Database Server with Rust,

Clean Database

docker-compose down -v

Create an .env

cp .env.example .env

Init Database

docker-compose up -d

If you don’t already have SQLX-CLI tool installed, run cargo install sqlx-cli to install it.

Migrate Db

sqlx migrate run

Init Server

cargo run

Or Watch server

cargo watch -q -c -w src/ -x run

Open Swagger UI

open http://0.0.0.0:8000/api-v1

Run tests

To run tests, make sure the database is running and it is clean.

docker-compose down -v

Create an .env

cp .env.example .env

Init Database

docker-compose up -d

Migrate Db

sqlx migrate run

Execute tests

cargo test

Contributors

ngjupeng

Issues