MaCH repo
This commit is contained in:
17
02_hello_world_html/main.c
Normal file
17
02_hello_world_html/main.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <mach.h>
|
||||
|
||||
void mach(){
|
||||
resource("home", "/",
|
||||
.get = {
|
||||
input({"name", .fallback = "world"}),
|
||||
mustache(.body =
|
||||
"<html>"
|
||||
"<head></head>"
|
||||
"<body>"
|
||||
"<p>Hello {{name}}</p>"
|
||||
"</body>"
|
||||
"</html>"
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user