W3cubDocs

/nginx

Command-line interface

njs scripts development and debugging can be performed from the command-line. The command-line utility is available after the installation of the Linux package or after building from the sources. Compared to njs running inside nginx, nginx objects (HTTP and Stream) are not available in the utility.

$ echo "2**3" | njs -q
8

$ njs
>> var o = {a:[]}
undefined

>> JSON.stringify(o, undefined,1)
{
 "a": [

 ]
}
>>

© 2002-2019 Igor Sysoev
© 2011-2019 Nginx, Inc.
Licensed under the BSD License.
https://nginx.org/en/docs/njs/cli.html