Add warp & tokio
parent
74d8634397
commit
33674eec78
File diff suppressed because it is too large
Load Diff
|
@ -5,3 +5,5 @@ edition = "2021"
|
||||||
authors = ["charlotte ✨ <charlotte@lavender.software>"]
|
authors = ["charlotte ✨ <charlotte@lavender.software>"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
tokio = { version = "1.15.0", features = ["full"] }
|
||||||
|
warp = "0.3.2"
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
fn main() {
|
use warp::Filter;
|
||||||
println!("Hello, world!");
|
|
||||||
|
#[tokio::main]
|
||||||
|
async fn main() {
|
||||||
|
let hello = warp::any().map(|| "Hello!".to_string());
|
||||||
|
warp::serve(hello).bind(([127, 0, 0, 1], 8000)).await;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue