Moved hello world to own module
parent
b49a01ab03
commit
57de7c66b3
|
@ -0,0 +1 @@
|
|||
pub mod routes;
|
|
@ -0,0 +1,4 @@
|
|||
#[get("/world")]
|
||||
pub fn world() -> &'static str {
|
||||
"Hello, world!"
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
mod ivago.controller;
|
|
@ -0,0 +1 @@
|
|||
mod ivago.routes;
|
|
@ -2,11 +2,8 @@
|
|||
|
||||
#[macro_use] extern crate rocket;
|
||||
|
||||
#[get("/")]
|
||||
fn index() -> &'static str {
|
||||
"Hello, world!"
|
||||
}
|
||||
mod hello;
|
||||
|
||||
fn main() {
|
||||
rocket::ignite().mount("/", routes![index]).launch();
|
||||
rocket::ignite().mount("/hello", routes![hello::routes::world]).launch();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue