Hello!
On Mon, Apr 21, 2014 at 1:58 AM, Mike wrote:
> Could You point to a tutorial how to create single page web pages with
> openresty/lua.
> Is this one of the use cases of openresty, where lua as a scripting language
> shines?
>
We (CloudFlare) use OpenResty/Lua online for web page templating.
There are quite some opensource templating libraries for Lua out
there. For example, CloudFlare is currently using the following
library:
https://code.google.com/p/slt/
But this does not mean OpenResty officially recommends this particular
library, so feel free to pick up your favorite one from Google search
or something like that.
Basically, when you generate a page with your template, you can just
call ngx_lua's Lua API function ngx.print() to emit it to the client.
It is that simple.
Regards,
-agentzh