MaCH repo
This commit is contained in:
42
08_todo_events/main.c
Normal file
42
08_todo_events/main.c
Normal 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}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user