Welcome! Log In Create A New Profile

Advanced

Where can I find nginScript shell

Posted by kimown 
kimown
Where can I find nginScript shell
January 06, 2018 10:00AM
$ njs
interactive njscript

v.<Tab> -> the properties and prototype methods of v.
type console.help() for more information


>> var my_data = '{"colors":[{"name":"red","fancy":"brick dust"},
{"name":"blue","fancy":"sea spray"}]}';
>> var my_object = JSON.parse(my_data);
>> my_object.colors[1].fancy;
sea spray
>>


I found this in https://www.nginx.com/blog/nginx-plus-r14-released/ ,but
where can I download?

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,278033,278033#msg-278033

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Maxim Konovalov
Re: Where can I find nginScript shell
January 06, 2018 06:00PM
Hello,

On 06/01/2018 11:52, kimown wrote:
> $ njs
> interactive njscript
>
> v.<Tab> -> the properties and prototype methods of v.
> type console.help() for more information
>
>
>>> var my_data = '{"colors":[{"name":"red","fancy":"brick dust"},
> {"name":"blue","fancy":"sea spray"}]}';
>>> var my_object = JSON.parse(my_data);
>>> my_object.colors[1].fancy;
> sea spray
>>>
>
>
> I found this in https://www.nginx.com/blog/nginx-plus-r14-released/ ,but
> where can I download?
>
It is a part of njs distribution, see http://hg.nginx.org/njs/file/tip

--
Maxim Konovalov
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
kimown
Re: Where can I find nginScript shell
January 07, 2018 03:10PM
I find the associated code, thanks for your help, but I'm not familiar with
how to building the nginScript shell, I think it's better add instruction in
README.Also, nginScript is really really awesome.

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,278033,278035#msg-278035

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Dmitry Volyntsev
Re: Where can I find nginScript shell
January 09, 2018 06:10PM
On 07.01.2018 17:06, kimown wrote:
> I find the associated code, thanks for your help, but I'm not familiar with
> how to building the nginScript shell, I think it's better add instruction in
> README.Also, nginScript is really really awesome.
>

It is available as a part of nginx official packages.
Just follow http://nginx.org/en/linux_packages.html#mainline
NJS CLI is included as a part of nginx-module-njs package.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Sorry, only registered users may post in this forum.

Click here to login