summary refs log tree commit diff
path: root/src/main.rs
diff options
context:
space:
mode:
authortempest <git@ashen.earth>2025-04-13 16:40:05 -0600
committertempest <git@ashen.earth>2025-04-13 16:40:05 -0600
commit128cc42557c8d7da46c63a40ea4469ed0eb7f26d (patch)
tree6b70766ec46061240a1d42fde100187697d60bc8 /src/main.rs
parente487e052b3cfcf90f6b831052e30323d3e744526 (diff)
Compiles, cannot find data context
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())