gourami

[UNMAINTAINED] Activitypub server in Rust
Log | Files | Refs | README | LICENSE

commit 21af785b02d213f05d2fc4e7b740f5be488b8bda
parent 3c1a49d5cf199f67200a330e72c8cc877d02a3ec
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Sun, 10 May 2020 16:30:36 -0500

Add dotenv

Diffstat:
M.gitignore | 1+
MCargo.lock | 7+++++++
MCargo.toml | 1+
MREADME.md | 2++
Msrc/main.rs | 2++
5 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -2,4 +2,5 @@ test_env sample.db warp-diesel-ructe-sample/ +.env /local diff --git a/Cargo.lock b/Cargo.lock @@ -412,6 +412,12 @@ dependencies = [ ] [[package]] +name = "dotenv" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" + +[[package]] name = "dtoa" version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -637,6 +643,7 @@ dependencies = [ "chrono", "clap", "diesel", + "dotenv", "env_logger", "http-signature-normalization", "hyper", diff --git a/Cargo.toml b/Cargo.toml @@ -13,6 +13,7 @@ bcrypt = "0.7.0" chrono = "0.4.11" clap = "2.33.0" diesel = { version = "1.4.4", features = ["sqlite", "r2d2"] } +dotenv = "0.15.0" env_logger = "0.7.1" http-signature-normalization = "0.5.1" hyper = "0.13.5" diff --git a/README.md b/README.md @@ -38,6 +38,8 @@ Run `cargo install --path .` Set environment variables (todo -- add more details) +Configuration is done via [dotenv](https://github.com/dotenv-rs/dotenv) + Run the local server with `gourami_social run` ## Deployment diff --git a/src/main.rs b/src/main.rs @@ -1,9 +1,11 @@ use clap::{App, Arg, SubCommand}; use gourami_social::routes::run_server; use gourami_social::ap; +use dotenv; #[tokio::main] async fn main() { + dotenv::dotenv().ok(); let matches = App::new("Gourami") .version("0.1.0") .author("Alex Wennerberg <alex@alexwennerberg.com>")