summary refs log tree commit diff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs
index 13512c5..d3c4f58 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -7,7 +7,7 @@ async fn main() {
     use leptos::prelude::*;
     use leptos_axum::{generate_route_list, LeptosRoutes};
     use stormscribe::components::app::*;
-    // use stormscribe::data::content::ContentController;
+    use stormscribe::data::content::ContentController;
 
     let conf = get_configuration(None).unwrap();
     let addr = conf.leptos_options.site_addr;
@@ -15,15 +15,15 @@ async fn main() {
     // Generate the list of routes in your Leptos App
     let routes = generate_route_list(App);
 
-    // let data_dir = std::path::Path::join(&std::env::current_dir().unwrap(), "data");
-    // let content_controller = ContentController::init(data_dir).unwrap();
+    let data_dir = std::path::Path::join(&std::env::current_dir().unwrap(), "data");
+    let content_controller = ContentController::init(data_dir).await.unwrap();
 
     let app = Router::new()
         .route("/", get(|| async {
             Redirect::temporary("/~/")
         }))
         .leptos_routes_with_context(&leptos_options, routes, move || {
-            // provide_context(content_controller.clone());
+            provide_context(content_controller.clone());
         }, {
             let leptos_options = leptos_options.clone();
             move || shell(leptos_options.clone())