From bbdb0c56895eb0c5c5ae0c0cda82ffc7199f27ac Mon Sep 17 00:00:00 2001 From: franklinblanco Date: Fri, 8 Jul 2022 11:30:15 -0400 Subject: [PATCH] Removed comment in main file --- Cargo.toml | 2 +- Readme.md | 42 ++++++++++++++++++++++++++++++++++++++++++ src/main.rs | 7 ------- 3 files changed, 43 insertions(+), 8 deletions(-) create mode 100644 Readme.md diff --git a/Cargo.toml b/Cargo.toml index 855d1af..e2a8460 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "user-svc-actix-backend" +name = "user-svc-actix" version = "0.1.0" edition = "2021" diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..80df122 --- /dev/null +++ b/Readme.md @@ -0,0 +1,42 @@ +# User service + +User service handles everything related to user creation, user login, etc... + +## Installation + +Use cargo to install the project dependencies + +```bash +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. + +```bash +cargo install sqlx-cli +``` + +Then execute and apply the migrations to the database. + +```bash +sqlx migrate run +``` + +# Tests +Tests are WIP. Not done yet. + +## License & Attribution +By Franklin E. Blanco +[Creative Commons](https://creativecommons.org/licenses/by-nc-nd/3.0/legalcode) \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 1df88d3..52453a9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,13 +21,6 @@ async fn main() -> Result<(), std::io::Error> { Err(e) => panic!("Failure starting the database. Reason: {}", e) }; - /*match insert_user(&mut db_conn, - &User{ id: 1, name: "s".to_string(), - time_created: Some(chrono::Utc::now().naive_utc()) }).await { - Ok(()) => {}, - Err(e) => {panic!("ERROR MYSQL {}", e)} - } -*/ // Run all migrations run_all_migrations(&mut db_conn).await;