Compare commits

..

1 Commits

Author SHA1 Message Date
adb312acbf Add renovate.json 2024-08-03 00:07:20 +00:00
4 changed files with 7 additions and 8 deletions

1
Cargo.lock generated
View File

@ -666,7 +666,6 @@ dependencies = [
"actix-web",
"clap",
"env_logger",
"log",
]
[[package]]

View File

@ -6,5 +6,4 @@ edition = "2021"
[dependencies]
clap = {version = "4.5.9", features = ["derive", "env"]}
actix-web = "4"
env_logger = "0.11.5"
log = "0.4.22"
env_logger = "0.11.5"

3
renovate.json Normal file
View File

@ -0,0 +1,3 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
}

View File

@ -7,9 +7,9 @@ use env_logger::Env;
#[derive(clap::Parser, Debug)]
#[command(version, about, long_about = None)]
struct Args {
/// Listen address
/// Name of the person to greet
#[arg(env, short, long, default_value = "0.0.0.0:8000")]
listen_addr: String,
listen_url: String,
}
#[get("/")]
@ -32,8 +32,6 @@ async fn main() -> std::io::Result<()> {
let args = Args::parse();
log::info!("Starting to listen on {}", args.listen_addr);
HttpServer::new(|| {
App::new()
.wrap(Logger::default())
@ -41,7 +39,7 @@ async fn main() -> std::io::Result<()> {
.service(echo)
.route("/hey", web::get().to(manual_hello))
})
.bind(args.listen_addr)?
.bind(args.listen_url)?
.run()
.await
}