The application now gets sensible info via environment variables.
This commit is contained in:
10
src/main.rs
10
src/main.rs
@@ -1,13 +1,13 @@
|
|||||||
mod go_daddy_ddns;
|
mod go_daddy_ddns;
|
||||||
mod ip_handler;
|
mod ip_handler;
|
||||||
|
|
||||||
use go_daddy_ddns::*;
|
use std::env;
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
// TODO: [GoDaddy] - Get the domain from ENV variable to replace "a".
|
let domain = env::var("DOMAIN").unwrap();
|
||||||
// TODO: [GoDaddy] - Get the key from ENV variable to replace "b".
|
let key = env::var("KEY").unwrap();
|
||||||
// TODO: [GoDaddy] - Get the secret from ENV variable to replace "c".
|
let secret = env::var("SECRET").unwrap();
|
||||||
|
|
||||||
go_daddy_ddns::exec("a", "b", "c").await
|
go_daddy_ddns::exec(&domain, &key, &secret).await
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user