Where can I find nginScript shell

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Where can I find nginScript shell

ayman
$ 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
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: Where can I find nginScript shell

Maxim Konovalov
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
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: Where can I find nginScript shell

ayman
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
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: Where can I find nginScript shell

Dmitry Volyntsev


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
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx