Skip to content

Commit

Permalink
reading env var
Browse files Browse the repository at this point in the history
  • Loading branch information
gaetbout committed Aug 20, 2023
1 parent 9014b2a commit 71574c2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
9 changes: 9 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ name = "stark_whale_alert"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
dotenv = "0.15.0"
8 changes: 7 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
use dotenv::dotenv;

fn main() {
println!("Hello, world!");
dotenv().ok();
let mailcoach_api_token = std::env::var("COINCAP_API_KEY").expect("COINCAP_API_KEY must be set.");


println!("Somethng {mailcoach_api_token}");
}

0 comments on commit 71574c2

Please sign in to comment.