This repository has been archived on 2026-04-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Neo-Poseidon/main.rs
Daniel Løvbrøtte Olsen c022cf1551 /api
2019-01-23 14:53:27 +01:00

18 lines
400 B
Rust

#![feature(proc_macro_hygiene, decl_macro)]
#[macro_use] extern crate rocket;
#[macro_use] extern crate rocket_contrib;
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!"
}