MaCH repo

This commit is contained in:
2025-07-24 12:46:01 -05:00
committed by Nick Ricketts
commit a41b07be87
105 changed files with 5862 additions and 0 deletions

42
08_todo_events/main.c Normal file
View File

@@ -0,0 +1,42 @@
#include <mach.h>
#include <session_auth.h>
#include "todos/todos.c"
#include "activity/activity.c"
config mach(){
return (config) {
.resources = {{
{"home", "/",
.get = {{
render((r){(asset){
#embed "static/home.mustache.html"
}})
}}
}},
.before = {session()},
.context = {
{"layout", (asset){
#embed "static/layout.mustache.html"
}}
},
.errors = {
{http_error, {
render((r){(asset){
#embed "static/5xx.mustache.html"
}})
}},
{http_not_found, {
render((r){(asset){
#embed "static/404.mustache.html"
}})
}}
}
},
.modules = {todos, activity, session_auth}
};
}