ncm-api-rs 0.1.0

Netease Cloud Music API Rust SDK
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use ncm_api_rs::server::{start_server, ServerConfig};

#[tokio::main]
async fn main() {
    // 初始化日志,默认 info 级别,可通过 RUST_LOG 环境变量覆盖
    // 例如: RUST_LOG=debug cargo run --features server --bin ncm-server
    tracing_subscriber::fmt()
        .with_env_filter(
            tracing_subscriber::EnvFilter::try_from_default_env()
                .unwrap_or_else(|_| "ncm_api_rs=info".into()),
        )
        .init();

    let config = ServerConfig::from_env();
    start_server(config).await;
}