Package Details: nginx-mainline-mod-njs 0.3.6-5

Git Clone URL: (read-only, click to copy)
Package Base: nginx-mainline-mod-njs
Description: nginScript module for mainline nginx
Upstream URL:
Licenses: custom
Submitter: mtorromeo
Maintainer: mtorromeo
Last Packager: mtorromeo
Votes: 2
Popularity: 0.000000
First Submitted: 2017-04-06 09:43
Last Updated: 2020-01-25 10:59

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 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:

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.send( 'Hello, world!' );

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/;
load_module /usr/lib/nginx/modules/;
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!