2023-04-30 15:55:41 +00:00
|
|
|
#[macro_use]
|
|
|
|
extern crate rocket;
|
|
|
|
|
2023-06-03 14:17:58 +00:00
|
|
|
use neveko_core::*;
|
|
|
|
use neveko_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();
|
2023-06-03 14:17:58 +00:00
|
|
|
log::info!("neveko-message is online");
|
2023-04-30 15:55:41 +00:00
|
|
|
rocket::custom(&config)
|
2024-04-07 14:43:18 +00:00
|
|
|
.mount("/message/decipher", routes![controller::decipher])
|
2023-04-30 15:55:41 +00:00
|
|
|
.mount("/messages", routes![controller::get_messages])
|
|
|
|
.mount("/tx", routes![controller::send_message])
|
|
|
|
}
|