rocket
This commit is contained in:
@@ -0,0 +1 @@
|
||||
/target
|
||||
Generated
+1538
File diff suppressed because it is too large
Load Diff
+10
@@ -0,0 +1,10 @@
|
||||
[package]
|
||||
name = "ozai"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
rocket = { version = "0.5.0", features = ["json"] }
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
use rocket::serde::{json::Json, Serialize};
|
||||
#[macro_use]
|
||||
extern crate rocket;
|
||||
|
||||
#[get("/")]
|
||||
fn index() -> String {
|
||||
"Hello, world!".to_string()
|
||||
}
|
||||
|
||||
#[launch]
|
||||
fn rocket() -> _ {
|
||||
rocket::build().mount("/", routes![index])
|
||||
}
|
||||
Reference in New Issue
Block a user