Hi,
I'd like to create a custom html web page via lua in OpenWRT. I don't want to push html string like below to do this task:
function handle_request(env)
uhttpd.send("Status: 200 OK\r\n")
uhttpd.send("Content-Type: text/html\r\n\r\n")
uhttpd.send("<html>HTML GOES HERE</html>")
end
I want to do it like php and mod-php in apache:
<html>
<head></head>
<body>
<?php
$SOME_PHP_HERE;
?>
</body>
</html>
I've found https://keplerproject.github.io/cgilua/manual.html page, about cgilua. Lua Pages part of the page to be exact: https://keplerproject.github.io/cgilua/ … #templates, but without a reference to uhttpd.
Please note that, I've uninstalled luci, and all dependencies, except uhttpd, uhttpd-mod-ubus. I've installed uhttpd-mod-lua for this, but not sure if it's gonna help.
How can I accomplish this task?
Thank you.