3 ms·
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 som
by susi22 11y ago
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 https://github.com/openresty/lua-nginx-module#synopsis
A more comprehensive guide: https://openresty.org/download/agentzh-nginx-tutorials-en.html https://openresty.org/download/agentzh-nginx-tutorials-en.ht...
- themartorana 11y agoYup, we love it. I moved to it a few years ago and it's worked fantastically. We've used it for everything from debugging access to newer services by simply including additional headers (in a staging environment of course) to blocking older versions of clients (we make games, there have been odd ways people cheat) to much more fluid handling of CORS, to direct access to Redis for fast polling for older devices that don't support web socket connections and more. This, of course, was all before the JavaScript interpreter was added to nginx proper, but I feel no need to move over to JavaScript so long as open resty stays supported. Edit: and it's fast as all get-out, I might add.