aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index feabb19..cfa08c6 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -86,12 +86,20 @@ int main(int argc, char **argv) {
}
fs.Scan();
- Blog blog;
-
ContentManager ctmgr;
- ctmgr.Register(blog);
+ ctmgr.RegisterModule(std::make_shared<Blog>("/blog"));
+
+ if (ctmgr.InitAll() == false)
+ {
+ std::cout << "InitAll() failed." << std::endl;
+ return 1;
+ }
EventManager evmgr;
- evmgr.setDefaultCallback(example_inja_render, {});
+ //evmgr.SetDefaultCallback(example_inja_render, {});
+ evmgr.AddCallback("/bla", example_inja_render, {});
+ evmgr.AddContentManager(ctmgr);
evmgr.Init(host, port);
+
+ //ctmgr.ShutdownAll();
}