simple http based meshd implemntation
parent
97b8d53b0a
commit
0a079be113
|
@ -0,0 +1 @@
|
|||
/target
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,10 @@
|
|||
[package]
|
||||
name = "meshd"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
actix-files = "0.5.0"
|
||||
actix-web = "3.3.2"
|
|
@ -0,0 +1 @@
|
|||
# Hi
|
|
@ -0,0 +1,17 @@
|
|||
use actix_files as fs;
|
||||
use actix_web::{App, HttpServer};
|
||||
pub const ADDR_STR: &str = "0.0.0.0:1500";
|
||||
#[actix_web::main]
|
||||
async fn main() -> std::io::Result<()> {
|
||||
println!("http://{}", ADDR_STR);
|
||||
HttpServer::new(|| {
|
||||
App::new().service(
|
||||
fs::Files::new("/", "assets/")
|
||||
.show_files_listing()
|
||||
.use_last_modified(true),
|
||||
)
|
||||
})
|
||||
.bind("0.0.0.0:1500")?
|
||||
.run()
|
||||
.await
|
||||
}
|
Loading…
Reference in New Issue