diff --git a/src/main.rs b/src/main.rs index 68534ac..c12c13f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -41,6 +41,10 @@ fn main() { Box::new(maaru_lang::Maaru::new()), Box::new(robo_lang::Robo::new()), ]; + schala_main(languages); +} + +fn schala_main(languages: Vec>) { let option_matches = program_options().parse(std::env::args()).unwrap_or_else(|e| { println!("{:?}", e); @@ -60,7 +64,7 @@ fn main() { } if option_matches.opt_present("webapp") { - webapp::web_main(); + webapp::web_main(languages); exit(0); } diff --git a/src/webapp.rs b/src/webapp.rs index e35bac3..303aea5 100644 --- a/src/webapp.rs +++ b/src/webapp.rs @@ -38,6 +38,6 @@ fn interpreter_input(input: Json) -> Json { Json(Output { text: code_output.to_string() }) } -pub fn web_main() { +pub fn web_main(languages: Vec>) { rocket::ignite().mount("/", routes![index, js_bundle, interpreter_input]).launch(); }