public class TemplatingAndLayoutExample {
public void run(WebServer server) throws IOException {
// We use Mustache templates with an .html extension
Templates templates = new Templates(
new JMustacheRenderer().fromDir(locateOnClasspath("examples/templates")).extension("html"));
final Template layout = templates.named("layout");
final Template greeting = templates.named("greeting");
// Apply a common layout to all rendered pages
server.filter("/", Layout.html(layout))
.start(new DynamicRoutes() {{
get("/hello").to(new Application() {