neveko/nevmes-message/src/main.rs

22 lines
596 B
Rust
Raw Normal View History

2023-04-30 15:55:41 +00:00
#[macro_use]
extern crate rocket;
use nevmes_core::*;
2023-05-09 21:28:07 +00:00
use nevmes_message::*;
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_message_port(),
..rocket::Config::debug_default()
};
env_logger::init();
log::info!("nevmes-message is online");
rocket::custom(&config)
.mount("/message/decrypt", routes![controller::decrypt])
.mount("/messages", routes![controller::get_messages])
.mount("/tx", routes![controller::send_message])
}