- Docker
- Rust
Build and run with cargo
:
cargo run
Using cargo install command, install diesel_cli
binary:
cargo install diesel_cli --no-default-features --features postgres
If theres no diesel.toml
file in the project directory, run diesel setup to generate such file.
Then run migrations issuing:
diesel migration run
In order to create a new migration issue: diesel
migration generate <migration name>
Method | URL | Req. Body | Res. Body |
---|---|---|---|
GET | /auth/login |
- | {"username": String, "password": String } |
Description of the environment variables defined in the .env.sample
.
Key | Description |
---|---|
POSTGRES_USER |
PostgreSQL Database User |
POSTGRES_PASSWORD |
PostgreSQL Database Password |
DATABASE_URL |
PostgreSQL Database URL (Connection String) |
Depending on your operative system you will probably need to install some packages to run this project.
The following commands must be issued to have all the dependencies in place
to build this project with cargo build
on an Ubuntu 20 system.
# install build-essential
sudo apt install build-essential
# instal openssl ref: https://docs.rs/crate/openssl/0.9.24
sudo apt-get install pkg-config libssl-dev
# install libpq-dev to use diesel and postgresql
sudo apt install libpq-dev