Neo-Poseidon/main.rs

18 lines
400 B
Rust
Raw Normal View History

2019-01-23 14:17:04 +01:00
#![feature(proc_macro_hygiene, decl_macro)]
2019-01-23 14:17:04 +01:00
#[macro_use] extern crate rocket;
2019-01-23 14:53:27 +01:00
#[macro_use] extern crate rocket_contrib;
2019-01-23 14:53:27 +01:00
use rocket_contrib::serve::StaticFiles;
2019-01-23 14:17:04 +01:00
fn main() {
2019-01-23 14:53:27 +01:00
let myrocket = rocket::ignite().mount("/", StaticFiles::from("static"));
let myrocket = myrocket.mount("/api", routes![world]);
myrocket.launch();
}
#[get("/")]
fn world() -> &'static str {
"Hello, world!"
2019-01-23 14:17:04 +01:00
}