Spaces:
Runtime error
Runtime error
Download src/main.rs from ankeke2026/ankeke: direct link, hf CLI and curl.
- Browser
- Download file 690 Bytes
-
https://huggingface.co/spaces/ankeke2026/ankeke/resolve/main/src/main.rs
- Command line
-
hf download hf://spaces/ankeke2026/ankeke/src/main.rs
-
curl -L -o main.rs https://huggingface.co/spaces/ankeke2026/ankeke/resolve/main/src/main.rs
690 Bytes
| // SPDX-License-Identifier: AGPL-3.0-only | |
| // Copyright (C) 2025 Moew72 <Moew72@proton.me> | |
| mod config; | |
| mod error; | |
| mod service; | |
| mod sign; | |
| use ntex::web; | |
| use crate::{ | |
| config::CONFIG, | |
| sign::{load_module, set_module_path, set_offset, unload_module}, | |
| }; | |
| async fn main() -> std::io::Result<()> { | |
| set_module_path(CONFIG.module_path.clone()); | |
| set_offset(CONFIG.offset); | |
| load_module(); | |
| web::HttpServer::new(|| { | |
| web::App::new() | |
| .service(service::sign_get) | |
| .service(service::sign_post) | |
| .service(service::appinfo) | |
| }) | |
| .bind(CONFIG.listen.clone())? | |
| .run() | |
| .await?; | |
| unload_module(); | |
| Ok(()) | |
| } | |