You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
491 B
Rust
18 lines
491 B
Rust
#[macro_use] extern crate rocket;
|
|
mod routes;
|
|
use routes::{block, transaction, address, search};
|
|
|
|
#[get("/")]
|
|
fn index() -> &'static str {
|
|
"Hello, world!"
|
|
}
|
|
|
|
#[launch]
|
|
fn rocket() -> _ {
|
|
rocket::build()
|
|
.mount("/", routes![index])
|
|
.mount("/block", routes![block::height, block::hash])
|
|
.mount("/transaction", routes![transaction::hash, transaction::receipt])
|
|
.mount("/address", routes![address::show])
|
|
.mount("/search", routes![search::show])
|
|
} |