Add web server
This commit is contained in:
parent
4142c72467
commit
e5fa79bb83
1 changed files with 11 additions and 2 deletions
13
src/main.rs
13
src/main.rs
|
@ -1,3 +1,12 @@
|
|||
fn main() {
|
||||
println!("Hello, world!");
|
||||
#![feature(proc_macro_hygiene, decl_macro)]
|
||||
|
||||
#[macro_use] extern crate rocket;
|
||||
|
||||
#[get("/")]
|
||||
fn index() -> &'static str {
|
||||
"Hello, World!"
|
||||
}
|
||||
|
||||
fn main() {
|
||||
rocket::ignite().mount("/", routes![index]).launch();
|
||||
}
|
||||
|
|
Reference in a new issue