Move web server code into server module.
This commit is contained in:
1 parent
01ebdf710e
commit
a54e7a341b
2 files changed
+16
-6
No files matched your search
@@ -0,0 +1,14 @@
|
||||
extern crate approx;
|
||||
|
||||
pub async fn run_server() {
|
||||
rocket::build()
|
||||
.mount("/", routes![hello])
|
||||
.launch()
|
||||
.await
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
#[get("/")]
|
||||
pub fn hello() -> &'static str {
|
||||
"Hello, world!"
|
||||
}
|
||||
Reference in new issue
Block a user