MaCH repo

This commit is contained in:
2025-07-24 12:46:01 -05:00
committed by Nick Ricketts
commit 18c20b0bad
75 changed files with 6000 additions and 0 deletions

36
06_todo_events/main.c Normal file
View File

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