comparison xml/en/docs/stream/ngx_stream_js_module.xml @ 1844:f56626ce9c40

Changed JavaScript to nginScript.
author Yaroslav Zhuravlev <yar@nginx.com>
date Thu, 01 Dec 2016 14:41:04 +0300
parents 15632fc2d548
children bfac366fa1e4
comparison
equal deleted inserted replaced
1843:3492eb9b8138 1844:f56626ce9c40
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> 7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
8 8
9 <module name="Module ngx_stream_js_module" 9 <module name="Module ngx_stream_js_module"
10 link="/en/docs/stream/ngx_stream_js_module.html" 10 link="/en/docs/stream/ngx_stream_js_module.html"
11 lang="en" 11 lang="en"
12 rev="1"> 12 rev="2">
13 13
14 <section id="summary"> 14 <section id="summary">
15 15
16 <para> 16 <para>
17 The <literal>ngx_stream_js_module</literal> module is used to 17 The <literal>ngx_stream_js_module</literal> module is used to implement
18 implement handlers in JavaScript. 18 handlers in nginScript —
19 a subset of the JavaScript language.
19 </para> 20 </para>
20 21
21 <para> 22 <para>
22 This module is not built by default, it should be compiled with 23 This module is not built by default, it should be compiled with
23 nginx JavaScript module using the 24 the nginScript module using the
24 <literal>--add_module</literal> configuration parameter: 25 <literal>--add_module</literal> configuration parameter:
25 <example> 26 <example>
26 ./configure --add-module=<value>path-to-njs</value>/nginx 27 ./configure --add-module=<value>path-to-njs</value>/nginx
27 </example> 28 </example>
28 The <link url="http://hg.nginx.org/njs">repository</link> 29 The <link url="http://hg.nginx.org/njs">repository</link>
29 with nginx JavaScript module can be cloned with the following command 30 with the nginScript module can be cloned with the following command
30 (requires <link url="https://www.mercurial-scm.org">Mercurial</link> client): 31 (requires <link url="https://www.mercurial-scm.org">Mercurial</link> client):
31 <example> 32 <example>
32 hg clone http://hg.nginx.org/njs 33 hg clone http://hg.nginx.org/njs
33 </example> 34 </example>
34 This module can also be built as 35 This module can also be built as
175 <default/> 176 <default/>
176 <context>stream</context> 177 <context>stream</context>
177 <context>server</context> 178 <context>server</context>
178 179
179 <para> 180 <para>
180 Sets a JavaScript function which will be called at the 181 Sets an nginScript function which will be called at the
181 <link doc="stream_processing.xml" id="access_phase">access</link> phase. 182 <link doc="stream_processing.xml" id="access_phase">access</link> phase.
182 </para> 183 </para>
183 184
184 </directive> 185 </directive>
185 186
202 <default/> 203 <default/>
203 <context>stream</context> 204 <context>stream</context>
204 <context>server</context> 205 <context>server</context>
205 206
206 <para> 207 <para>
207 Specifies a file that implements server and variable handlers in JavaScript. 208 Specifies a file that implements server and variable handlers in nginScript.
208 </para> 209 </para>
209 210
210 </directive> 211 </directive>
211 212
212 213
215 <default/> 216 <default/>
216 <context>stream</context> 217 <context>stream</context>
217 <context>server</context> 218 <context>server</context>
218 219
219 <para> 220 <para>
220 Sets a JavaScript function which will be called at the 221 Sets an nginScript function which will be called at the
221 <link doc="stream_processing.xml" id="preread_phase">preread</link> phase. 222 <link doc="stream_processing.xml" id="preread_phase">preread</link> phase.
222 </para> 223 </para>
223 224
224 </directive> 225 </directive>
225 226
230 <default/> 231 <default/>
231 <context>stream</context> 232 <context>stream</context>
232 <context>server</context> 233 <context>server</context>
233 234
234 <para> 235 <para>
235 Sets a JavaScript function for the specified variable. 236 Sets an nginScript function for the specified variable.
236 </para> 237 </para>
237 238
238 </directive> 239 </directive>
239 240
240 </section> 241 </section>
241 242
242 243
243 <section id="properties" name="Session Object Properties"> 244 <section id="properties" name="Session Object Properties">
244 <para> 245 <para>
245 Each stream JavaScript handler receives one argument, a stream session object. 246 Each stream nginScript handler receives one argument, a stream session object.
246 </para> 247 </para>
247 248
248 <para> 249 <para>
249 The session object has the following properties: 250 The session object has the following properties:
250 251