add some comments

master
rascul 2 years ago
parent 41d6b1b8de
commit 1750f0441b

@ -25,9 +25,13 @@ pub fn default_false() -> bool {
#[actix_web::main] #[actix_web::main]
async fn main() -> std::io::Result<()> { async fn main() -> std::io::Result<()> {
// parse command line arguments
let options = Options::init(); let options = Options::init();
// start logger
rag::init().unwrap(); rag::init().unwrap();
// load templates
let mut handlebars = Handlebars::new(); let mut handlebars = Handlebars::new();
handlebars.register_templates_directory(".html", "./templates").unwrap(); handlebars.register_templates_directory(".html", "./templates").unwrap();
let handlebars_ref = web::Data::new(handlebars); let handlebars_ref = web::Data::new(handlebars);
@ -35,6 +39,7 @@ async fn main() -> std::io::Result<()> {
info!("Configuration (see --help to change):"); info!("Configuration (see --help to change):");
info!("{:?}", options); info!("{:?}", options);
// setup and start http server
HttpServer::new(move || { HttpServer::new(move || {
App::new() App::new()
.app_data(handlebars_ref.clone()) .app_data(handlebars_ref.clone())

Loading…
Cancel
Save