diff --git a/Cargo.toml b/Cargo.toml index 2f8ae69..169db7c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,8 +23,11 @@ futures-util = "0.3" num_cpus = "1.15" bcrypt = "0.14" uuid = { version = "1.3", features = ["v4", "serde"] } -oauth2 = "4.3" -reqwest = { version = "0.11", features = ["json"] } +oauth2 = { version = "4.3", optional = true } +reqwest = { version = "0.11", features = ["json"], optional = true } + +[features] +gitea = ["oauth2", "reqwest"] [dev-dependencies] actix-rt = "2.8" diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..c44f8c2 --- /dev/null +++ b/start.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +# Get the directory of the script and change to it +cd "$(dirname "$0")" + +export SECRET_KEY=1234 + +cargo run diff --git a/start_with_gitea.sh b/start_with_gitea.sh new file mode 100755 index 0000000..0a9073f --- /dev/null +++ b/start_with_gitea.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Get the directory of the script and change to it +cd "$(dirname "$0")" + +export GITEA_CLIENT_ID="your_client_id" +export GITEA_CLIENT_SECRET="your_client_secret" +export GITEA_INSTANCE_URL="https://gitea.example.com" +export APP_URL="http://localhost:9999" +cargo run --features gitea