04d60bd3ef | ||
---|---|---|
deploy | ||
migrations | ||
sql/schema | ||
src | ||
.DS_Store | ||
.gitignore | ||
Cargo.toml | ||
Dockerfile | ||
Readme.md | ||
build.rs | ||
deploy-to-backend.sh |
Readme.md
User service
User service handles everything related to user creation, user login, etc...
Installation
Use cargo to install the project dependencies
cargo build
Setup
Env variables: Create a .env file and include the following variables
- HOST_ADDRESS
- HOST_PORT
- DB_HOST
- DB_USER
- DB_PASS
- DB_DATABASE_NAME
- DATABASE_URL
To run this project correctly, you must first apply the migrations to the database. You can do this by installing sqlx-cli.
cargo install sqlx-cli
Then execute and apply the migrations to the database.
sqlx migrate run
Tests
Tests are WIP. Not done yet.
Release
To build for release on current platform
cargo build --release
To build for release on x86-64 linux
cargo build --release --target x86_64-unknown-linux-gnu
To build and deploy to server
./deploy-to-backend.sh
Or follow this guide (Export these vars): cross-compilation-from-m1 You can find the executable inside target/release/{name of proj}
License & Attribution
By Franklin E. Blanco Creative Commons