Mercurial > hg > nginx-site
annotate xml/ru/docs/njs/index.xml @ 3000:7eafa16bb07c
Replaced "delete" to "del" in js_shared_dict_zone.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Wed, 16 Aug 2023 12:12:22 +0100 |
parents | cc475ba7d406 |
children | 2ff222c4ff8a |
rev | line source |
---|---|
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
1 <?xml version="1.0"?> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
2 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
3 <!-- |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
4 Copyright (C) Nginx, Inc. |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
5 --> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
6 |
2244
467aef18bf12
Renamed the "About njs" page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2229
diff
changeset
|
7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
8 |
2244
467aef18bf12
Renamed the "About njs" page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2229
diff
changeset
|
9 <article name="Сценарный язык njs" |
467aef18bf12
Renamed the "About njs" page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2229
diff
changeset
|
10 link="/ru/docs/njs/index.html" |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
11 lang="ru" |
2984
cc475ba7d406
Added Preload Objects article in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2804
diff
changeset
|
12 rev="34" |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
13 toc="no"> |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
14 |
2270
cd9934924920
Moved summary to top of njs index page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2263
diff
changeset
|
15 <section id="summary"> |
cd9934924920
Moved summary to top of njs index page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2263
diff
changeset
|
16 |
cd9934924920
Moved summary to top of njs index page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2263
diff
changeset
|
17 <para> |
cd9934924920
Moved summary to top of njs index page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2263
diff
changeset
|
18 njs - это подмножество языка JavaScript, позволяющее |
cd9934924920
Moved summary to top of njs index page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2263
diff
changeset
|
19 расширить функциональность nginx. |
cd9934924920
Moved summary to top of njs index page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2263
diff
changeset
|
20 njs совместим с |
cd9934924920
Moved summary to top of njs index page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2263
diff
changeset
|
21 <link url="http://www.ecma-international.org/ecma-262/5.1/">ECMAScript 5.1</link> |
cd9934924920
Moved summary to top of njs index page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2263
diff
changeset
|
22 (строгий режим) c некоторыми расширениями |
cd9934924920
Moved summary to top of njs index page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2263
diff
changeset
|
23 <link url="http://www.ecma-international.org/ecma-262/6.0/">ECMAScript 6</link> |
cd9934924920
Moved summary to top of njs index page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2263
diff
changeset
|
24 и позже. |
2984
cc475ba7d406
Added Preload Objects article in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2804
diff
changeset
|
25 Совместимость находится в стадии <link doc="compatibility.xml">развития</link>. |
2270
cd9934924920
Moved summary to top of njs index page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2263
diff
changeset
|
26 </para> |
cd9934924920
Moved summary to top of njs index page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2263
diff
changeset
|
27 |
cd9934924920
Moved summary to top of njs index page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2263
diff
changeset
|
28 </section> |
cd9934924920
Moved summary to top of njs index page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2263
diff
changeset
|
29 |
cd9934924920
Moved summary to top of njs index page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2263
diff
changeset
|
30 |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
31 <section id="links"> |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
32 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
33 <para> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
34 <list type="bullet"> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
35 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
36 <listitem> |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
37 <link doc="install.xml"/> |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
38 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
39 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
40 <listitem> |
2246
32ba43abf9cd
Renamed njs API, njs Changes.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2245
diff
changeset
|
41 <link doc="changes.xml">Изменения в njs</link> |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
42 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
43 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
44 <listitem> |
2246
32ba43abf9cd
Renamed njs API, njs Changes.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2245
diff
changeset
|
45 <link doc="reference.xml"/> |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
46 </listitem> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
47 |
2004
d1a1253a570e
Documented Object methods, exponential and hex literals in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1955
diff
changeset
|
48 <listitem> |
2804
8831b3d9f332
Moved njs Examples to GitHub.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2577
diff
changeset
|
49 <link url="https://github.com/nginx/njs-examples/">Примеры использования</link> |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
50 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
51 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
52 <listitem> |
2984
cc475ba7d406
Added Preload Objects article in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2804
diff
changeset
|
53 <link doc="security.xml"/> |
cc475ba7d406
Added Preload Objects article in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2804
diff
changeset
|
54 </listitem> |
cc475ba7d406
Added Preload Objects article in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2804
diff
changeset
|
55 |
cc475ba7d406
Added Preload Objects article in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2804
diff
changeset
|
56 <listitem> |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
57 <link doc="compatibility.xml"/> |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
58 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
59 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
60 <listitem> |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
61 <link doc="cli.xml"/> |
2071
838c503fd2f7
Documented JSON object support for njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2026
diff
changeset
|
62 </listitem> |
838c503fd2f7
Documented JSON object support for njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2026
diff
changeset
|
63 |
2555
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
64 <listitem> |
2984
cc475ba7d406
Added Preload Objects article in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2804
diff
changeset
|
65 <link doc="preload_objects.xml"/> |
cc475ba7d406
Added Preload Objects article in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2804
diff
changeset
|
66 </listitem> |
cc475ba7d406
Added Preload Objects article in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2804
diff
changeset
|
67 |
cc475ba7d406
Added Preload Objects article in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2804
diff
changeset
|
68 <listitem> |
2555
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
69 <link id="tested_os_and_platforms">Протестированные ОС и платформы</link> |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
70 </listitem> |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
71 |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
72 </list> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
73 </para> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
74 |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
75 <para> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
76 <list type="bullet"> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
77 |
2071
838c503fd2f7
Documented JSON object support for njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2026
diff
changeset
|
78 <listitem> |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
79 <link doc="../http/ngx_http_js_module.xml"> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
80 ngx_http_js_module</link> |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
81 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
82 |
2076
07239ff77f50
Updated supported functionality for nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2071
diff
changeset
|
83 <listitem> |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
84 <link doc="../stream/ngx_stream_js_module.xml"> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
85 ngx_stream_js_module</link> |
2129
4212f4520070
Updated "About njs" with methods supported in njs-0.2.0.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2128
diff
changeset
|
86 </listitem> |
4212f4520070
Updated "About njs" with methods supported in njs-0.2.0.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2128
diff
changeset
|
87 |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
88 </list> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
89 </para> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
90 |
2541
0e6bbd8138c4
Added article about TypeScript in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2504
diff
changeset
|
91 <para> |
0e6bbd8138c4
Added article about TypeScript in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2504
diff
changeset
|
92 <list type="bullet"> |
0e6bbd8138c4
Added article about TypeScript in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2504
diff
changeset
|
93 |
0e6bbd8138c4
Added article about TypeScript in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2504
diff
changeset
|
94 <listitem> |
0e6bbd8138c4
Added article about TypeScript in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2504
diff
changeset
|
95 <link doc="typescript.xml"/> |
0e6bbd8138c4
Added article about TypeScript in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2504
diff
changeset
|
96 </listitem> |
0e6bbd8138c4
Added article about TypeScript in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2504
diff
changeset
|
97 |
0e6bbd8138c4
Added article about TypeScript in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2504
diff
changeset
|
98 <listitem> |
2577
67fd664e2612
Translated "Using node modules with njs" into Russian.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2556
diff
changeset
|
99 <link doc="node_modules.xml"/> |
2541
0e6bbd8138c4
Added article about TypeScript in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2504
diff
changeset
|
100 </listitem> |
0e6bbd8138c4
Added article about TypeScript in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2504
diff
changeset
|
101 |
0e6bbd8138c4
Added article about TypeScript in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2504
diff
changeset
|
102 </list> |
0e6bbd8138c4
Added article about TypeScript in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2504
diff
changeset
|
103 </para> |
0e6bbd8138c4
Added article about TypeScript in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2504
diff
changeset
|
104 |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
105 </section> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
106 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
107 |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
108 <section id="usecases" name="Сценарии использования"> |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
109 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
110 <para> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
111 <list type="bullet"> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
112 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
113 <listitem> |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
114 Комплексное управление доступом и проверка защиты при помощи njs |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
115 до получения запроса сервером группы |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
116 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
117 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
118 <listitem> |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
119 Управление заголовками ответа |
2150
af5751930f95
Described new Function() as not supported in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2148
diff
changeset
|
120 </listitem> |
af5751930f95
Described new Function() as not supported in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2148
diff
changeset
|
121 |
af5751930f95
Described new Function() as not supported in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2148
diff
changeset
|
122 <listitem> |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
123 Создание гибких асинхронных обработчиков содержимого и фильтров |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
124 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
125 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
126 </list> |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
127 Подробнее о сценариях использования |
2804
8831b3d9f332
Moved njs Examples to GitHub.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2577
diff
changeset
|
128 см. в <link url="https://github.com/nginx/njs-examples/">примерах</link> |
2504
d25a5081e35c
Matched English and Russian versions of njs index.xml.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2270
diff
changeset
|
129 и <link url="https://www.nginx.com/blog/tag/nginx-javascript-module/">блогпостах</link>. |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
130 </para> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
131 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
132 </section> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
133 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
134 |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
135 <section id="example" name="Базовый пример HTTP"> |
2175
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2174
diff
changeset
|
136 |
cd4889fdcfa4
Moved njs HTTP and Stream API to a separate page.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2174
diff
changeset
|
137 <para> |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
138 Чтобы использовать njs в nginx, необходимо: |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
139 <list type="bullet"> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
140 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
141 <listitem> |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
142 <para> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
143 <link doc="install.xml">установить</link> njs |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
144 </para> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
145 </listitem> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
146 |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
147 <listitem id="hello_world"> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
148 <para> |
2556
c81b1fadbcf3
Updated hello_world example in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2555
diff
changeset
|
149 создать файл сценария njs, например <path>http.js</path>. |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
150 Описание свойств и методов языка njs |
2246
32ba43abf9cd
Renamed njs API, njs Changes.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2245
diff
changeset
|
151 см. в <link doc="reference.xml">справочнике</link>. |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
152 <example> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
153 function hello(r) { |
2257
8cef5ef98336
Changed quotes to ASCII in NJS example.
Nick Shadrin <nick@nginx.com>
parents:
2246
diff
changeset
|
154 r.return(200, "Hello world!"); |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
155 } |
2556
c81b1fadbcf3
Updated hello_world example in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2555
diff
changeset
|
156 |
c81b1fadbcf3
Updated hello_world example in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2555
diff
changeset
|
157 export default {hello}; |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
158 </example> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
159 </para> |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
160 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
161 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
162 <listitem> |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
163 |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
164 <para> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
165 в файле <path>nginx.conf</path> включить |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
166 модуль <link doc="../http/ngx_http_js_module.xml">ngx_http_js_module</link> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
167 и указать директиву |
2556
c81b1fadbcf3
Updated hello_world example in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2555
diff
changeset
|
168 <link doc="../http/ngx_http_js_module.xml" id="js_import">js_import</link> |
c81b1fadbcf3
Updated hello_world example in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2555
diff
changeset
|
169 с файлом сценария <path>http.js</path>: |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
170 <example> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
171 load_module modules/ngx_http_js_module.so; |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
172 |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
173 events {} |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
174 |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
175 http { |
2556
c81b1fadbcf3
Updated hello_world example in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2555
diff
changeset
|
176 js_import http.js; |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
177 |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
178 server { |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
179 listen 8000; |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
180 |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
181 location / { |
2556
c81b1fadbcf3
Updated hello_world example in njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2555
diff
changeset
|
182 js_content http.hello; |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
183 } |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
184 } |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
185 } |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
186 </example> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
187 </para> |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
188 </listitem> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
189 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
190 </list> |
2504
d25a5081e35c
Matched English and Russian versions of njs index.xml.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2270
diff
changeset
|
191 Также доступна отдельная утилита <link doc="cli.xml">командной строки</link>, |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2244
diff
changeset
|
192 которая может использоваться независимо от nginx для разработки и отладки njs. |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
193 </para> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
194 |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
195 </section> |
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
196 |
2263
1bec6f727a84
Added njs presentation from nginx.conf 2018.
Valentin Bartenev <vbart@nginx.com>
parents:
2257
diff
changeset
|
197 |
2555
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
198 <section id="tested_os_and_platforms" |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
199 name="Протестированные ОС и платформы"> |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
200 |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
201 <para> |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
202 <list type="bullet"> |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
203 |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
204 <listitem> |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
205 FreeBSD / amd64; |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
206 </listitem> |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
207 |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
208 <listitem> |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
209 Linux / x86, amd64, arm64, ppc64el; |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
210 </listitem> |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
211 |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
212 <listitem> |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
213 Solaris 11 / amd64; |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
214 </listitem> |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
215 |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
216 <listitem> |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
217 macOS / x86_64; |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
218 </listitem> |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
219 |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
220 </list> |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
221 </para> |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
222 |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
223 </section> |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
224 |
5b2764724e0d
Added list of supported OSes to njs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2541
diff
changeset
|
225 |
2263
1bec6f727a84
Added njs presentation from nginx.conf 2018.
Valentin Bartenev <vbart@nginx.com>
parents:
2257
diff
changeset
|
226 <section id="presentation" name="Презентация на nginx.conf 2018"> |
1bec6f727a84
Added njs presentation from nginx.conf 2018.
Valentin Bartenev <vbart@nginx.com>
parents:
2257
diff
changeset
|
227 |
1bec6f727a84
Added njs presentation from nginx.conf 2018.
Valentin Bartenev <vbart@nginx.com>
parents:
2257
diff
changeset
|
228 <para><video id="Jc_L6UffFOs" /></para> |
1bec6f727a84
Added njs presentation from nginx.conf 2018.
Valentin Bartenev <vbart@nginx.com>
parents:
2257
diff
changeset
|
229 |
1bec6f727a84
Added njs presentation from nginx.conf 2018.
Valentin Bartenev <vbart@nginx.com>
parents:
2257
diff
changeset
|
230 </section> |
1bec6f727a84
Added njs presentation from nginx.conf 2018.
Valentin Bartenev <vbart@nginx.com>
parents:
2257
diff
changeset
|
231 |
1846
bfac366fa1e4
Added article about nginScript.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
232 </article> |