# HG changeset patch # User Yaroslav Zhuravlev # Date 1537805417 -10800 # Node ID 467aef18bf12b52442150f0f47bdd1304019dc4b # Parent 8cc7642ba82e42d4f1f97b7e5f58b1e938659aec Renamed the "About njs" page. diff -r 8cc7642ba82e -r 467aef18bf12 xml/en/GNUmakefile --- a/xml/en/GNUmakefile Tue Oct 02 18:23:39 2018 +0300 +++ b/xml/en/GNUmakefile Mon Sep 24 19:10:17 2018 +0300 @@ -24,7 +24,6 @@ contributing_changes \ beginners_guide \ configure \ - njs_about \ FAQ = \ welcome_nginx_facebook \ @@ -123,6 +122,7 @@ stream/stream_processing \ ngx_google_perftools_module \ dev/development_guide \ + njs/index \ njs/njs_changes \ njs/njs_api \ diff -r 8cc7642ba82e -r 467aef18bf12 xml/en/docs/http/ngx_http_js_module.xml --- a/xml/en/docs/http/ngx_http_js_module.xml Tue Oct 02 18:23:39 2018 +0300 +++ b/xml/en/docs/http/ngx_http_js_module.xml Mon Sep 24 19:10:17 2018 +0300 @@ -9,21 +9,21 @@ + rev="16">
The ngx_http_js_module module is used to implement location and variable handlers -in njs — +in njs — a subset of the JavaScript language. This module is not built by default. Download and install instructions are available -here. +here.
diff -r 8cc7642ba82e -r 467aef18bf12 xml/en/docs/index.xml --- a/xml/en/docs/index.xml Tue Oct 02 18:23:39 2018 +0300 +++ b/xml/en/docs/index.xml Mon Sep 24 19:10:17 2018 +0300 @@ -8,7 +8,7 @@
@@ -98,7 +98,7 @@ - +Scripting with njs diff -r 8cc7642ba82e -r 467aef18bf12 xml/en/docs/njs/index.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml/en/docs/njs/index.xml Mon Sep 24 19:10:17 2018 +0300 @@ -0,0 +1,375 @@ + + + + + + +
+ +
+ + +njs is a subset of the JavaScript language that allows +implementing location and variable handlers in +http and +stream. +njs is created in compliance with +ECMAScript 5.1 +(strict mode) with some +ECMAScript 6 +extensions. +The compliance is still evolving. + + +
+ + +
+ + + + + +Boolean values, numbers, strings, objects, arrays, +functions, and regular expressions + + + +ES5.1 operators, ES7 exponentiation operators + + + +ES5.1 statements: var, if, +else, switch, for, +for in, while, +do while, break, +continue, return, try, +catch, throw, finally + + + +ES6 Number and +Math properties and methods + + + +String methods: + + + +ES5.1: +fromCharCode, concat, +slice, substring, +substr, charAt, +charCodeAt, indexOf, +lastIndexOf, toLowerCase, +toUpperCase, trim, +search, match, split, +replace + + + +ES6: +fromCodePoint, codePointAt, +includes, startsWith, +endsWith, repeat + + + +non-standard: +bytesFrom (0.2.3) +fromUTF8, toUTF8, +fromBytes, toBytes + + + + + + +Object methods: + + +ES5.1: +create (support without properties list), +keys, +defineProperty, +defineProperties, +getOwnPropertyDescriptor, +getPrototypeOf, +hasOwnProperty, +isPrototypeOf, +preventExtensions, +isExtensible, +freeze, +isFrozen, +seal, +isSealed + + + + + + +Array methods: + + +ES5.1: +isArray, slice, splice, +push, pop, unshift, +shift, reverse, sort, +join, concat, indexOf, +lastIndexOf, forEach, +some, every, filter, +map, reduce, +reduceRight + + + +ES6: +of, fill, find, +findIndex + + + +ES7: includes + + + + + + +ES5.1 Function methods: +call, apply, bind + + + +ES5.1 RegExp methods: +test, exec + + + +ES5.1 Date methods + + + +ES5.1 JSON object + + + +ES5.1 global functions: +isFinite, isNaN, +parseFloat, parseInt, +decodeURI, decodeURIComponent, +encodeURI, encodeURIComponent + + + +Error objects: +Error, EvalError, +InternalError, RangeError, +ReferenceError, SyntaxError, +TypeError, URIError + + + +setTimeout() and clearTimeout() functions +(0.2.0) + + + +Node.js style +File system methods: +fs.readFile, fs.readFileSync, +fs.appendFile, fs.appendFileSync, +fs.writeFile, fs.writeFileSync + + + +Node.js style +Crypto methods (0.2.0): +crypto.createHash, +crypto.createHmac + + + + + + +
+ + +
+ + + + + +ES6 let and const declarations + + + +labels + + + +arguments array + + + +eval function + + + +new Function() constructor + + + +setInterval, +setImmediate functions + + + +non-integer fractions (.235) + + + + + +
+ + +
+ + +The complete list of njs changes is available +here. + +
+ + +
+ + +njs API reference is available +here. + +
+ + +
+ + +njs is available in two modules: + + + +ngx_http_js_module + + + +ngx_stream_js_module + + + +Both modules are not built by default, +they should be either compiled from the sources +or installed as a Linux package. +In addition, the Linux package provides +njs command-line utility. + + + +
+ +For Linux, njs modules +packages can be used: + + + +nginx-module-njs — njs +dynamic modules + + + +nginx-module-njs-dbg — debug symbols for the +nginx-module-njs package + + + + + +
+ + +
+ + +The repository +with njs sources can be cloned with the following command: +(requires Mercurial client): + +hg clone http://hg.nginx.org/njs + +Then the modules should be compiled using the +--add-module configuration parameter: + +./configure --add-module=path-to-njs/nginx + +The modules can also be built as +dynamic: + +./configure --add-dynamic-module=path-to-njs/nginx + + + + +To build only njs command-line utility, run +./configure and make njs commands +from njs root directory. +The utility is available as ./build/njs. + + +
+ +
+ + +
+ + +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 - +8 + +$ njs +>> var o = {a:[]} +undefined + +>> JSON.stringify(o, undefined,1) +{ + "a": [ + + ] +} +>> + + + +
+ +
diff -r 8cc7642ba82e -r 467aef18bf12 xml/en/docs/njs/njs_api.xml --- a/xml/en/docs/njs/njs_api.xml Tue Oct 02 18:23:39 2018 +0300 +++ b/xml/en/docs/njs/njs_api.xml Mon Sep 24 19:10:17 2018 +0300 @@ -14,7 +14,7 @@
-njs provides objects, methods and properties +njs provides objects, methods and properties for extending nginx functionality. diff -r 8cc7642ba82e -r 467aef18bf12 xml/en/docs/njs_about.xml --- a/xml/en/docs/njs_about.xml Tue Oct 02 18:23:39 2018 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,375 +0,0 @@ - - - - - - -
- -
- - -njs is a subset of the JavaScript language that allows -implementing location and variable handlers in -http and -stream. -njs is created in compliance with -ECMAScript 5.1 -(strict mode) with some -ECMAScript 6 -extensions. -The compliance is still evolving. - - -
- - -
- - - - - -Boolean values, numbers, strings, objects, arrays, -functions, and regular expressions - - - -ES5.1 operators, ES7 exponentiation operators - - - -ES5.1 statements: var, if, -else, switch, for, -for in, while, -do while, break, -continue, return, try, -catch, throw, finally - - - -ES6 Number and -Math properties and methods - - - -String methods: - - - -ES5.1: -fromCharCode, concat, -slice, substring, -substr, charAt, -charCodeAt, indexOf, -lastIndexOf, toLowerCase, -toUpperCase, trim, -search, match, split, -replace - - - -ES6: -fromCodePoint, codePointAt, -includes, startsWith, -endsWith, repeat - - - -non-standard: -bytesFrom (0.2.3) -fromUTF8, toUTF8, -fromBytes, toBytes - - - - - - -Object methods: - - -ES5.1: -create (support without properties list), -keys, -defineProperty, -defineProperties, -getOwnPropertyDescriptor, -getPrototypeOf, -hasOwnProperty, -isPrototypeOf, -preventExtensions, -isExtensible, -freeze, -isFrozen, -seal, -isSealed - - - - - - -Array methods: - - -ES5.1: -isArray, slice, splice, -push, pop, unshift, -shift, reverse, sort, -join, concat, indexOf, -lastIndexOf, forEach, -some, every, filter, -map, reduce, -reduceRight - - - -ES6: -of, fill, find, -findIndex - - - -ES7: includes - - - - - - -ES5.1 Function methods: -call, apply, bind - - - -ES5.1 RegExp methods: -test, exec - - - -ES5.1 Date methods - - - -ES5.1 JSON object - - - -ES5.1 global functions: -isFinite, isNaN, -parseFloat, parseInt, -decodeURI, decodeURIComponent, -encodeURI, encodeURIComponent - - - -Error objects: -Error, EvalError, -InternalError, RangeError, -ReferenceError, SyntaxError, -TypeError, URIError - - - -setTimeout() and clearTimeout() functions -(0.2.0) - - - -Node.js style -File system methods: -fs.readFile, fs.readFileSync, -fs.appendFile, fs.appendFileSync, -fs.writeFile, fs.writeFileSync - - - -Node.js style -Crypto methods (0.2.0): -crypto.createHash, -crypto.createHmac - - - - - - -
- - -
- - - - - -ES6 let and const declarations - - - -labels - - - -arguments array - - - -eval function - - - -new Function() constructor - - - -setInterval, -setImmediate functions - - - -non-integer fractions (.235) - - - - - -
- - -
- - -The complete list of njs changes is available -here. - -
- - -
- - -njs API reference is available -here. - -
- - -
- - -njs is available in two modules: - - - -ngx_http_js_module - - - -ngx_stream_js_module - - - -Both modules are not built by default, -they should be either compiled from the sources -or installed as a Linux package. -In addition, the Linux package provides -njs command-line utility. - - - -
- -For Linux, njs modules -packages can be used: - - - -nginx-module-njs — njs -dynamic modules - - - -nginx-module-njs-dbg — debug symbols for the -nginx-module-njs package - - - - - -
- - -
- - -The repository -with njs sources can be cloned with the following command: -(requires Mercurial client): - -hg clone http://hg.nginx.org/njs - -Then the modules should be compiled using the ---add-module configuration parameter: - -./configure --add-module=path-to-njs/nginx - -The modules can also be built as -dynamic: - -./configure --add-dynamic-module=path-to-njs/nginx - - - - -To build only njs command-line utility, run -./configure and make njs commands -from njs root directory. -The utility is available as ./build/njs. - - -
- -
- - -
- - -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 - -8 - -$ njs ->> var o = {a:[]} -undefined - ->> JSON.stringify(o, undefined,1) -{ - "a": [ - - ] -} ->> - - - -
- -
diff -r 8cc7642ba82e -r 467aef18bf12 xml/en/docs/stream/ngx_stream_js_module.xml --- a/xml/en/docs/stream/ngx_stream_js_module.xml Tue Oct 02 18:23:39 2018 +0300 +++ b/xml/en/docs/stream/ngx_stream_js_module.xml Mon Sep 24 19:10:17 2018 +0300 @@ -9,20 +9,20 @@ + rev="14">
The ngx_stream_js_module module is used to implement -handlers in njs — +handlers in njs — a subset of the JavaScript language. This module is not built by default. Download and install instructions are available -here. +here.
diff -r 8cc7642ba82e -r 467aef18bf12 xml/en/index.xml --- a/xml/en/index.xml Tue Oct 02 18:23:39 2018 +0300 +++ b/xml/en/index.xml Mon Sep 24 19:10:17 2018 +0300 @@ -8,7 +8,7 @@
+ rev="96">
@@ -209,7 +209,7 @@ -njs. +njs scripting language. @@ -335,7 +335,7 @@ -njs. +njs scripting language. diff -r 8cc7642ba82e -r 467aef18bf12 xml/index.xml --- a/xml/index.xml Tue Oct 02 18:23:39 2018 +0300 +++ b/xml/index.xml Mon Sep 24 19:10:17 2018 +0300 @@ -34,7 +34,7 @@ -njs-0.2.4 +njs-0.2.4 version has been released, featuring s.on(), s.off(), @@ -56,7 +56,7 @@ -njs-0.2.3 +njs-0.2.3 version has been released, featuring String.bytesFrom(), String.padStart(), @@ -93,7 +93,7 @@ -njs-0.2.2 +njs-0.2.2 version has been released, featuring HTTP internalRedirect() method support @@ -119,7 +119,7 @@ -njs-0.2.1 +njs-0.2.1 version has been released. @@ -178,7 +178,7 @@ -njs-0.2.0 +njs-0.2.0 version has been released, featuring HTTP subrequest() method support diff -r 8cc7642ba82e -r 467aef18bf12 xml/ru/GNUmakefile --- a/xml/ru/GNUmakefile Tue Oct 02 18:23:39 2018 +0300 +++ b/xml/ru/GNUmakefile Mon Sep 24 19:10:17 2018 +0300 @@ -19,7 +19,6 @@ contributing_changes \ beginners_guide \ configure \ - njs_about \ FAQ = \ sys_errlist \ @@ -107,6 +106,7 @@ stream/ngx_stream_upstream_hc_module \ stream/stream_processing \ ngx_google_perftools_module \ + njs/index \ njs/njs_api \ TOP = \ diff -r 8cc7642ba82e -r 467aef18bf12 xml/ru/docs/http/ngx_http_js_module.xml --- a/xml/ru/docs/http/ngx_http_js_module.xml Tue Oct 02 18:23:39 2018 +0300 +++ b/xml/ru/docs/http/ngx_http_js_module.xml Mon Sep 24 19:10:17 2018 +0300 @@ -9,21 +9,21 @@ + rev="16">
Модуль ngx_http_js_module позволяет задавать обработчики location и переменных -на njs — +на njs — подмножестве языка JavaScript. По умолчанию этот модуль не собирается. Инструкция по сборке и установке доступны -здесь. +здесь.
diff -r 8cc7642ba82e -r 467aef18bf12 xml/ru/docs/index.xml --- a/xml/ru/docs/index.xml Tue Oct 02 18:23:39 2018 +0300 +++ b/xml/ru/docs/index.xml Mon Sep 24 19:10:17 2018 +0300 @@ -8,7 +8,7 @@
@@ -99,7 +99,7 @@ - +Создание сценариев на njs diff -r 8cc7642ba82e -r 467aef18bf12 xml/ru/docs/njs/index.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml/ru/docs/njs/index.xml Mon Sep 24 19:10:17 2018 +0300 @@ -0,0 +1,374 @@ + + + + + + +
+ +
+ + +njs - это подмножество языка JavaScript, который позволяет +задавать обработчики location и переменных в +http и +stream. +njs совместим с +ECMAScript 5.1 +(строгий режим) c некоторыми расширениями +ECMAScript 6. +Совместимость находится в стадии развития. + + +
+ + +
+ + + + + +Логические значения, числа, строки, объекты, массивы, +функции и регулярные выражения + + + +ES5.1 операторы, ES7 операторы возведения в степень + + + +ES5.1 инструкции: var, if, +else, switch, for, +for in, while, +do while, break, +continue, return, try, +catch, throw, finally + + + +ES6 методы и свойства Number и +Math + + + +Методы String: + + + +ES5.1: +fromCharCode, concat, +slice, substring, +substr, charAt, +charCodeAt, indexOf, +lastIndexOf, toLowerCase, +toUpperCase, trim, +search, match, split, +replace + + + +ES6: +fromCodePoint, codePointAt, +includes, startsWith, +endsWith, repeat + + + +нестандартные: +bytesFrom (0.2.3), +fromUTF8, toUTF8, +fromBytes, toBytes + + + + + + +Методы Object: + + +ES5.1: +create (поддержка без списка свойств), +keys, +defineProperty, +defineProperties, +getOwnPropertyDescriptor, +getPrototypeOf, +hasOwnProperty, +isPrototypeOf, +preventExtensions, +isExtensible, +freeze, +isFrozen, +seal, +isSealed + + + + + + +Методы Array: + + +ES5.1: +isArray, slice, splice, +push, pop, unshift, +shift, reverse, sort, +join, concat, indexOf, +lastIndexOf, forEach, +some, every, filter, +map, reduce, +reduceRight + + + +ES6: +of, fill, find, +findIndex + + + +ES7: includes + + + + + + +ES5.1 методы Function: +call, apply, bind + + + +ES5.1 методы RegExp: +test, exec + + + +ES5.1 методы Date + + + +ES5.1 объект JSON + + + +ES5.1 глобальные функции: +isFinite, isNaN, +parseFloat, parseInt, +decodeURI, decodeURIComponent, +encodeURI, encodeURIComponent + + + +Объекты Error: +Error, EvalError, +InternalError, RangeError, +ReferenceError, SyntaxError, +TypeError, URIError + + + +Функции setTimeout() и clearTimeout() +(0.2.0) + + + +Методы File system +стиль Node.js: +fs.readFile, fs.readFileSync, +fs.appendFile, fs.appendFileSync, +fs.writeFile, fs.writeFileSync + + + +Методы Crypto +стиль Node.js +(0.2.0): +crypto.createHash, +crypto.createHmac + + + + + +
+ + +
+ + + + + +ES6 объявления let и const + + + +labels + + + +массив arguments + + + +функция eval + + + +конструктор new Function() + + + +функции setInterval, +setImmediate + + + +дроби без целой части (.235) + + + + + +
+ + +
+ + +Полная история изменений njs доступна +здесь. + +
+ +
+ + +Справочник njs API доступен +здесь. + +
+ + +
+ + +njs доступен в двух модулях: + + + +ngx_http_js_module + + + +ngx_stream_js_module + + + +По умолчанию модули не собираются +их необходимо собрать из исходного кода +или установить из отдельного пакета Linux. +Кроме того, в пакете Linux предоставляется +утилита командной строки njs. + + + +
+ +Для установки модулей njs на Linux могут быть использованы +пакеты: + + + +nginx-module-njs — +динамические модули +njs + + + +nginx-module-njs-dbg — debug-символы для +пакета nginx-module-njs + + + + + +
+ + +
+ + +Репозиторий +с исходным кодом njs можно клонировать следующей командой: +(необходим клиент Mercurial): + +hg clone http://hg.nginx.org/njs + +Затем модули необходимо собрать с помощью +конфигурационного параметра --add-module: + +./configure --add-module=path-to-njs/nginx + +Модули также можно собрать как +динамические: + +./configure --add-dynamic-module=path-to-njs/nginx + + + + +Чтобы собрать только утилиту командной строки njs +необходимо запустить +команды ./configure и make njs +из корневого каталога. +Утилита доступна как ./build/njs. + + +
+ + +
+ + +Создание и отладка njs-скриптов может осуществляться +в командной строке. +Утилита командной строки доступна после установки +пакета Linux +или после сборки из исходных файлов. +В отличие от njs, запущенном внутри nginx, +в утилите недоступны объекты nginx +(HTTP и +Stream). + +$ echo "2**3" | njs - +8 + +$ njs +>> var o = {a:[]} +undefined + +>> JSON.stringify(o, undefined,1) +{ + "a": [ + + ] +} +>> + + + +
+ +
+ +
diff -r 8cc7642ba82e -r 467aef18bf12 xml/ru/docs/njs/njs_api.xml --- a/xml/ru/docs/njs/njs_api.xml Tue Oct 02 18:23:39 2018 +0300 +++ b/xml/ru/docs/njs/njs_api.xml Mon Sep 24 19:10:17 2018 +0300 @@ -14,7 +14,7 @@
-njs предоставляет объекты, методы и свойства +njs предоставляет объекты, методы и свойства для расширения функциональности nginx. diff -r 8cc7642ba82e -r 467aef18bf12 xml/ru/docs/njs_about.xml --- a/xml/ru/docs/njs_about.xml Tue Oct 02 18:23:39 2018 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,374 +0,0 @@ - - - - - - -
- -
- - -njs - это подмножество языка JavaScript, который позволяет -задавать обработчики location и переменных в -http и -stream. -njs совместим с -ECMAScript 5.1 -(строгий режим) c некоторыми расширениями -ECMAScript 6. -Совместимость находится в стадии развития. - - -
- - -
- - - - - -Логические значения, числа, строки, объекты, массивы, -функции и регулярные выражения - - - -ES5.1 операторы, ES7 операторы возведения в степень - - - -ES5.1 инструкции: var, if, -else, switch, for, -for in, while, -do while, break, -continue, return, try, -catch, throw, finally - - - -ES6 методы и свойства Number и -Math - - - -Методы String: - - - -ES5.1: -fromCharCode, concat, -slice, substring, -substr, charAt, -charCodeAt, indexOf, -lastIndexOf, toLowerCase, -toUpperCase, trim, -search, match, split, -replace - - - -ES6: -fromCodePoint, codePointAt, -includes, startsWith, -endsWith, repeat - - - -нестандартные: -bytesFrom (0.2.3), -fromUTF8, toUTF8, -fromBytes, toBytes - - - - - - -Методы Object: - - -ES5.1: -create (поддержка без списка свойств), -keys, -defineProperty, -defineProperties, -getOwnPropertyDescriptor, -getPrototypeOf, -hasOwnProperty, -isPrototypeOf, -preventExtensions, -isExtensible, -freeze, -isFrozen, -seal, -isSealed - - - - - - -Методы Array: - - -ES5.1: -isArray, slice, splice, -push, pop, unshift, -shift, reverse, sort, -join, concat, indexOf, -lastIndexOf, forEach, -some, every, filter, -map, reduce, -reduceRight - - - -ES6: -of, fill, find, -findIndex - - - -ES7: includes - - - - - - -ES5.1 методы Function: -call, apply, bind - - - -ES5.1 методы RegExp: -test, exec - - - -ES5.1 методы Date - - - -ES5.1 объект JSON - - - -ES5.1 глобальные функции: -isFinite, isNaN, -parseFloat, parseInt, -decodeURI, decodeURIComponent, -encodeURI, encodeURIComponent - - - -Объекты Error: -Error, EvalError, -InternalError, RangeError, -ReferenceError, SyntaxError, -TypeError, URIError - - - -Функции setTimeout() и clearTimeout() -(0.2.0) - - - -Методы File system -стиль Node.js: -fs.readFile, fs.readFileSync, -fs.appendFile, fs.appendFileSync, -fs.writeFile, fs.writeFileSync - - - -Методы Crypto -стиль Node.js -(0.2.0): -crypto.createHash, -crypto.createHmac - - - - - -
- - -
- - - - - -ES6 объявления let и const - - - -labels - - - -массив arguments - - - -функция eval - - - -конструктор new Function() - - - -функции setInterval, -setImmediate - - - -дроби без целой части (.235) - - - - - -
- - -
- - -Полная история изменений njs доступна -здесь. - -
- -
- - -Справочник njs API доступен -здесь. - -
- - -
- - -njs доступен в двух модулях: - - - -ngx_http_js_module - - - -ngx_stream_js_module - - - -По умолчанию модули не собираются -их необходимо собрать из исходного кода -или установить из отдельного пакета Linux. -Кроме того, в пакете Linux предоставляется -утилита командной строки njs. - - - -
- -Для установки модулей njs на Linux могут быть использованы -пакеты: - - - -nginx-module-njs — -динамические модули -njs - - - -nginx-module-njs-dbg — debug-символы для -пакета nginx-module-njs - - - - - -
- - -
- - -Репозиторий -с исходным кодом njs можно клонировать следующей командой: -(необходим клиент Mercurial): - -hg clone http://hg.nginx.org/njs - -Затем модули необходимо собрать с помощью -конфигурационного параметра --add-module: - -./configure --add-module=path-to-njs/nginx - -Модули также можно собрать как -динамические: - -./configure --add-dynamic-module=path-to-njs/nginx - - - - -Чтобы собрать только утилиту командной строки njs -необходимо запустить -команды ./configure и make njs -из корневого каталога. -Утилита доступна как ./build/njs. - - -
- - -
- - -Создание и отладка njs-скриптов может осуществляться -в командной строке. -Утилита командной строки доступна после установки -пакета Linux -или после сборки из исходных файлов. -В отличие от njs, запущенном внутри nginx, -в утилите недоступны объекты nginx -(HTTP и -Stream). - -$ echo "2**3" | njs - -8 - -$ njs ->> var o = {a:[]} -undefined - ->> JSON.stringify(o, undefined,1) -{ - "a": [ - - ] -} ->> - - - -
- -
- -
diff -r 8cc7642ba82e -r 467aef18bf12 xml/ru/docs/stream/ngx_stream_js_module.xml --- a/xml/ru/docs/stream/ngx_stream_js_module.xml Tue Oct 02 18:23:39 2018 +0300 +++ b/xml/ru/docs/stream/ngx_stream_js_module.xml Mon Sep 24 19:10:17 2018 +0300 @@ -9,20 +9,20 @@ + rev="14">
Модуль ngx_stream_js_module позволяет задавать -обработчики на njs — +обработчики на njs — подмножестве языка JavaScript. По умолчанию этот модуль не собирается. Инструкция по сборке и установке доступны -здесь. +здесь.
diff -r 8cc7642ba82e -r 467aef18bf12 xml/ru/index.xml --- a/xml/ru/index.xml Tue Oct 02 18:23:39 2018 +0300 +++ b/xml/ru/index.xml Mon Sep 24 19:10:17 2018 +0300 @@ -8,7 +8,7 @@
+ rev="96">
@@ -208,7 +208,7 @@ -njs. +сценарный язык njs. @@ -335,7 +335,7 @@ -njs. +сценарный язык njs.