Closed HermannLizard closed 1 year ago
Hi @xeioex, do you know when will https://github.com/nginxinc/docker-nginx update njs version to 0.8.0?
Hi @xiaoxiangmoe,
I think @thresheek, may answer this question.
do you know when will https://github.com/nginxinc/docker-nginx update njs version to 0.8.0?
Or you can just use a bare image with Alpine Linux Edge and install nginx
, nginx-mod-http-js
and any other modules you need. We also package dozens of third-party modules. ;)
@xiaoxiangmoe the image will be updated with new nginx release.
Hey folks,
I think there's just a small mistake on docs, apparently "delete" is a reserved word and cannot be used as a function name?
When using it as
function delete(r) {
r.return(200, ngx.shared.certs.delete(r.args.key));
}
it gives me Unexpected token "delete"
while if the function is called "del(r)" it works fine.
it gives me Unexpected token "delete" while if the function is called "del(r)" it works fine.
So don’t name it delete
… Functions can be named delete
, but you cannot declare it like this. For example, Foo.prototype.delete = function() { }
is allowed.
I just copied the example from docs, that’s why I’ve commented it :)
Aha, I see now, you’re right.
@xeioex, where can I find repository for https://nginx.org/en/docs/njs/ ?
https://nginx.org/en/docs/http/ngx_http_js_module.html#js_shared_dict_zone
js_shared_dict_zone
Sets the name and size of the shared memory zone that keeps the key-value dictionary shared between worker processes.
Is there anything that will define a shared variable between all requests for each single worker process?
https://github.com/nginx/njs/issues/431 https://github.com/nginx/njs/issues/354#issuecomment-723712610
For instance, this can be used in web gray-release solution, totally replace the "redis+nginx+lua" solution, since web maintainers is usually more familiar with JavaScript than lua, like, me. More controllable, more flexible. Sincerely looking forward to it.