Openresty is fantastic. On a static website I did last year I implemented some basic login with it and some Elasticsearch full text search. If you just need some very simple REST API and don't want to start with a full blown backend server you can just script some pretty powerful stuff with it.
Since a few weeks ago Openresty also has "..._by_lua_block" directives that allow you to just write some lua straight into the config without having to escape the lua code:
https://github.com/openresty/lua-nginx-module#synopsis
A more comprehensive guide: https://openresty.org/download/agentzh-nginx-tutorials-en.ht...