#![feature(proc_macro_hygiene,decl_macro)] #[macro_use] extern crate rocket; extern crate rocket_contrib; extern crate regex; extern crate chrono; #[macro_use] extern crate serde_derive; //mod exchange; mod parsers; mod banking; mod web_frontend; use rocket_contrib::templates::Template; fn main() { // handle command line parameters // e.g. wheres is the asset config ini file // TODO how pass config to the modules/handler ? // launch web frontend let asset_ini = "data/asset.ini"; banking::asset::Asset::from_ini_file(asset_ini); rocket::ignite() .attach(Template::fairing()) .mount("/", routes![web_frontend::transactions::transaction_handler, web_frontend::balance::balance_handler, web_frontend::static_handler, web_frontend::chart::chart_handler, web_frontend::asset::asset_handler]) .launch(); }