我总是空白页
我在浏览器中尝试了不同的方式:
http://127.0.0.1:8001/prod.html
src / routes.erl
route(<<"prod">>) -> prod;
priv / templates / prod.html
<html >
<head>
<title>{{title}}</title>
</head>
<body>
{{body}}
</body>
</html>
src / prod.erl
-module(prod).
-compile(export_all).
-include_lib("nitro/include/nitro.hrl").
-include_lib("n2o/include/n2o.hrl").
main() ->
[ #dtl { file="prod", bindings=[{title,<<"Title">>},{body,body()}]} ].
body() -> "HTML Body".
任何帮助将不胜感激