Package Details: nginx-mainline-mod-njs 0.3.3-1

Git Clone URL: https://aur.archlinux.org/nginx-mainline-mod-njs.git (read-only)
Package Base: nginx-mainline-mod-njs
Description: nginScript module for mainline nginx
Upstream URL: https://nginx.org/en/docs/njs_about.html
Licenses: custom
Submitter: mtorromeo
Maintainer: mtorromeo
Last Packager: mtorromeo
Votes: 2
Popularity: 0.000000
First Submitted: 2017-04-06 09:43
Last Updated: 2019-07-03 09:44

Latest Comments

diraria commented on 2017-04-17 16:52

Yes, you are right, thank you a lot!
It is very strange, that in nginScript documentation (at https://www.nginx.com/resources/wiki/nginScript/) js_run exists.

mtorromeo commented on 2017-04-17 08:38

The js_run directive doesn't exist.
ngx_http_js_module only has 3 directives: js_include, js_content and js_set

I suggest you read the module documentation: http://nginx.org/en/docs/http/ngx_http_js_module.html

diraria commented on 2017-04-17 07:33

Thank you for answer! Can you, please, help me. I do:
1) Install nginx-mainline
2) Install nginx-mainline-mod-njs
3) Reboot

3) Add location with js_run to server block in /etc/nginx/nginx.conf
location /hello {
js_run "function hello(req, res) {
res.contentType = 'text/plain';
res.status = 200;
res.sendHeader();

res.send( 'Hello, world!' );
res.finish();
}";
}

4) Run "nginx -s reload"
It gives me error 'unknown directive "js_run"'.

Also I tried to add lines
load_module /usr/lib/nginx/modules/ngx_http_js_module.so;
load_module /usr/lib/nginx/modules/ngx_stream_js_module.so;
to the beginning of /etc/nginx/nginx.conf, and it didn't help. Thank you!

mtorromeo commented on 2017-04-17 00:39

No, these modules are compiled to work WITH nginx-mainline so you should not remove it.

diraria commented on 2017-04-16 11:31

Hello, thank you for this package! Could you say, please, if I have already installed nginx-mainline, should I delete ngonx-mainline before install your package? Thank you!