Skip to content

Instantly share code, notes, and snippets.

@Akio-m
Created August 23, 2020 15:37
Tideのサンプルコード3
use tide::prelude::*;
#[async_std::main]
async fn main() -> Result<(), std::io::Error> {
tide::log::start();
let mut app = tide::new();
app.at("/system/ping").get(|_| async { Ok(json!({"ok" : "pong"})) });
app.listen("127.0.0.1:8080").await?;
Ok(())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment