Go to file
Franklin bf0030b7f1 Updated user service to use u32 instead of i32 and updated the dev-dtos lib 2023-03-05 09:08:51 -04:00
deploy added deploy folder 2022-07-14 01:08:45 -04:00
migrations Updated user service to use u32 instead of i32 and updated the dev-dtos lib 2023-03-05 09:08:51 -04:00
sql/schema fixed user service flaws 2022-08-26 13:58:47 -04:00
src Updated user service to use u32 instead of i32 and updated the dev-dtos lib 2023-03-05 09:08:51 -04:00
.DS_Store Updated user service to use u32 instead of i32 and updated the dev-dtos lib 2023-03-05 09:08:51 -04:00
.gitignore added deploy folder 2022-07-14 01:08:45 -04:00
Cargo.toml Updated user service to use u32 instead of i32 and updated the dev-dtos lib 2023-03-05 09:08:51 -04:00
Dockerfile commit 2022-07-13 13:38:46 -04:00
Readme.md Fixed internal server error caused by database exploding 2022-08-26 14:18:45 -04:00
deploy-to-backend.sh Changed deploy script name 2022-07-14 00:53:45 -04:00

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

  1. HOST_ADDRESS
  2. HOST_PORT
  3. DB_HOST
  4. DB_USER
  5. DB_PASS
  6. DB_DATABASE_NAME
  7. 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 From m1 macs

brew tap SergioBenitez/osxct
brew install x86_64-unknown-linux-gnu
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