diff --git a/Cargo.lock b/Cargo.lock index 3d9b4da..22785a1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,15 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "dotenv" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" + [[package]] name = "stark_whale_alert" version = "0.1.0" +dependencies = [ + "dotenv", +] diff --git a/Cargo.toml b/Cargo.toml index 2e3e727..8814e8f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/src/main.rs b/src/main.rs index e7a11a9..636a45b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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}"); }