2023-04-30 15:55:41 +00:00
|
|
|
#[macro_use]
|
|
|
|
extern crate rocket;
|
|
|
|
|
2023-06-03 14:17:58 +00:00
|
|
|
use neveko_contact::*;
|
|
|
|
use neveko_core::*;
|
2023-04-30 15:55:41 +00:00
|
|
|
|
|
|
|
// The only changes in here should be mounting new controller methods
|
|
|
|
|
|
|
|
#[launch]
|
|
|
|
async fn rocket() -> _ {
|
|
|
|
let config = rocket::Config {
|
|
|
|
port: utils::get_app_contact_port(),
|
|
|
|
..rocket::Config::debug_default()
|
|
|
|
};
|
|
|
|
env_logger::init();
|
2023-06-03 14:17:58 +00:00
|
|
|
log::info!("neveko-contact is online");
|
2023-04-30 15:55:41 +00:00
|
|
|
rocket::custom(&config)
|
|
|
|
.mount("/trust", routes![controller::trust_contact])
|
2023-05-07 05:06:08 +00:00
|
|
|
.mount("/prove", routes![controller::prove_payment])
|
2023-04-30 15:55:41 +00:00
|
|
|
.mount("/contact", routes![controller::add_contact])
|
|
|
|
.mount("/contacts", routes![controller::get_contacts])
|
|
|
|
}
|