2025-07-24 12:46:01 -05:00
|
|
|
#include <nerak.h>
|
|
|
|
|
|
|
|
|
|
config(app){
|
|
|
|
|
context("greeting",
|
|
|
|
|
"<html>"
|
|
|
|
|
"<head></head>"
|
|
|
|
|
"<body>"
|
|
|
|
|
"<p>Hello {{name}}</p>"
|
|
|
|
|
"</body>"
|
|
|
|
|
"</html>"
|
|
|
|
|
);
|
|
|
|
|
resource("home", "/",
|
|
|
|
|
.get = {
|
|
|
|
|
input({"name", .def = "world"}),
|
|
|
|
|
mustache("greeting", "hello"),
|
|
|
|
|
respond("hello")
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
}
|