Skip to content

Commit e3d19fb

Browse files
committed
Patch .env file loading
1 parent b48da90 commit e3d19fb

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/target
2+
/result
23

34
.env
45

56
/certs
6-
/certs/*
7+
/certs/*

Cargo.lock

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ axum = { version = "0.7.5", features = ["ws"] }
88
axum-auth = "0.7.0"
99
axum-extra = { version = "0.9.3", features = ["typed-header"] }
1010
axum-server = { version = "0.7.1", features = ["tls-rustls"] }
11+
dotenv = "0.15.0"
1112
futures-util = "0.3.30"
1213
reqwest = "0.12.5"
1314
serde = { version = "1.0.204", features = ["derive"] }

package.nix

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ rustPlatform.buildRustPackage rec {
77
src = fetchFromGitHub {
88
owner = "purduehackers";
99
repo = "api";
10-
rev = "c9d1815dc0f2242e7838f2788faff2aa42bd9e53";
11-
hash = "sha256-8szcy81DC6SrIkPXzey7tYXOshh9jJ08FYb1QDIRprM=";
10+
rev = "b48da90a0623d4af59261629396ccbe325ce8952";
11+
hash = "sha256-xvPpXpILJNrigl8MZQrakCcMJE8KI+BiPUBf+bOgQzM=";
1212
};
1313

1414
nativeBuildInputs = [ pkg-config ];
1515
buildInputs = [ openssl ];
1616

17-
cargoHash = "sha256-1ciCBFcJoelIWirrFgei5RArdmG/O5q5Zo/ZX/i0Dwc=";
17+
cargoHash = "sha256-N+Ol92OhrRla/+G20+XtH9T1zUaKo06LoJIfzR5mPHA=";
1818
cargoDepsName = pname;
1919
}

src/main.rs

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ use endpoints::{
1313
EndpointModule,
1414
};
1515
use serde_json::{json, Value};
16+
use dotenv::dotenv;
1617

1718
/*
1819
#[derive(Clone, Copy)]
@@ -24,6 +25,8 @@ struct Ports {
2425

2526
#[tokio::main]
2627
async fn main() {
28+
dotenv().ok();
29+
2730
let app = Router::new()
2831
.route("/", get(root))
2932
.nest(DOORBELL_BASE_ENDPOINT, DoorbellModule::create_router())

0 commit comments

Comments
 (0)