20 lines
411 B
Rust
20 lines
411 B
Rust
#![feature(proc_macro_hygiene, decl_macro)]
|
|
|
|
#[macro_use] extern crate rocket;
|
|
#[macro_use] extern crate rocket_contrib;
|
|
|
|
mod game;
|
|
|
|
use rocket_contrib::serve::StaticFiles;
|
|
|
|
fn main() {
|
|
let myrocket = rocket::ignite().mount("/", StaticFiles::from("static"));
|
|
let myrocket = myrocket.mount("/api", routes![world]);
|
|
myrocket.launch();
|
|
}
|
|
|
|
|
|
#[get("/")]
|
|
fn world() -> &'static str {
|
|
"Hello, world!"
|
|
} |