mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-09 09:09:03 +03:00
feat: support tls
This commit is contained in:
13
src/main.rs
13
src/main.rs
@@ -4,16 +4,11 @@ macro_rules! bail {
|
||||
}
|
||||
}
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
mod args;
|
||||
mod server;
|
||||
|
||||
pub type BoxResult<T> = Result<T, Box<dyn std::error::Error>>;
|
||||
|
||||
use log::LevelFilter;
|
||||
|
||||
use crate::args::{matches, Args};
|
||||
use crate::server::serve;
|
||||
|
||||
@@ -24,14 +19,6 @@ async fn main() {
|
||||
|
||||
async fn run() -> BoxResult<()> {
|
||||
let args = Args::parse(matches())?;
|
||||
|
||||
if std::env::var("RUST_LOG").is_ok() {
|
||||
simple_logger::init()?;
|
||||
} else {
|
||||
simple_logger::SimpleLogger::default()
|
||||
.with_level(LevelFilter::Info)
|
||||
.init()?;
|
||||
}
|
||||
serve(args).await
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user