MaCH repo
This commit is contained in:
14
01_hello_world_text/main.c
Normal file
14
01_hello_world_text/main.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <mach.h>
|
||||
|
||||
config mach(){
|
||||
return (config) {
|
||||
.resources = {
|
||||
{"home", "/", .mime = m_txt,
|
||||
.get = {
|
||||
input({"name", .validate = v_not_empty, .fallback = "world"}),
|
||||
render(.template = "Hello {{name}}")
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user