MaCH repo

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

View File

@@ -0,0 +1,26 @@
#include <mach.h>
config mach(){
return (config) {
.resources = {{
{"home", "/",
.get = {{
validate((v){
.name = "name",
.validation = "^\\S{1,16}$",
.fallback = "world",
.message = "must be 1-16 characters, no spaces"
}),
render((r){
"<html>"
"<head></head>"
"<body>"
"<p>Hello {{name}}</p>"
"</body>"
"</html>"
})
}}
}
}}
};
}