comparison xml/en/docs/http/ngx_http_js_module.xml @ 2128:59a3cc84f507

Renamed nginScript to njs
author Yaroslav Zhuravlev <yar@nginx.com>
date Tue, 03 Apr 2018 20:23:40 +0300
parents af51ec6b5489
children 6c7841469ec5
comparison
equal deleted inserted replaced
2127:284598bb7fbb 2128:59a3cc84f507
7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> 7 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
8 8
9 <module name="Module ngx_http_js_module" 9 <module name="Module ngx_http_js_module"
10 link="/en/docs/http/ngx_http_js_module.html" 10 link="/en/docs/http/ngx_http_js_module.html"
11 lang="en" 11 lang="en"
12 rev="7"> 12 rev="8">
13 13
14 <section id="summary"> 14 <section id="summary">
15 15
16 <para> 16 <para>
17 The <literal>ngx_http_js_module</literal> module is used to implement 17 The <literal>ngx_http_js_module</literal> module is used to implement
18 location and variable handlers 18 location and variable handlers
19 in <link doc="../njs_about.xml">nginScript</link> — 19 in <link doc="../njs_about.xml">njs</link> —
20 a subset of the JavaScript language. 20 a subset of the JavaScript language.
21 </para> 21 </para>
22 22
23 <para> 23 <para>
24 This module is not built by default, it should be compiled with 24 This module is not built by default, it should be compiled with
25 the nginScript module using the 25 the njs module using the
26 <literal>--add-module</literal> configuration parameter: 26 <literal>--add-module</literal> configuration parameter:
27 <example> 27 <example>
28 ./configure --add-module=<value>path-to-njs</value>/nginx 28 ./configure --add-module=<value>path-to-njs</value>/nginx
29 </example> 29 </example>
30 The <link url="http://hg.nginx.org/njs">repository</link> 30 The <link url="http://hg.nginx.org/njs">repository</link>
31 with the nginScript module can be cloned with the following command 31 with the njs module can be cloned with the following command
32 (requires <link url="https://www.mercurial-scm.org">Mercurial</link> client): 32 (requires <link url="https://www.mercurial-scm.org">Mercurial</link> client):
33 <example> 33 <example>
34 hg clone http://hg.nginx.org/njs 34 hg clone http://hg.nginx.org/njs
35 </example> 35 </example>
36 This module can also be built as 36 This module can also be built as
123 <syntax><value>file</value></syntax> 123 <syntax><value>file</value></syntax>
124 <default/> 124 <default/>
125 <context>http</context> 125 <context>http</context>
126 126
127 <para> 127 <para>
128 Specifies a file that implements location and variable handlers in nginScript. 128 Specifies a file that implements location and variable handlers in njs.
129 </para> 129 </para>
130 130
131 </directive> 131 </directive>
132 132
133 133
136 <default/> 136 <default/>
137 <context>location</context> 137 <context>location</context>
138 <context>limit_except</context> 138 <context>limit_except</context>
139 139
140 <para> 140 <para>
141 Sets an nginScript function as a location content handler. 141 Sets an njs function as a location content handler.
142 </para> 142 </para>
143 143
144 </directive> 144 </directive>
145 145
146 146
149 <value>$variable</value> <value>function</value></syntax> 149 <value>$variable</value> <value>function</value></syntax>
150 <default/> 150 <default/>
151 <context>http</context> 151 <context>http</context>
152 152
153 <para> 153 <para>
154 Sets an nginScript function for the specified variable. 154 Sets an njs function for the specified variable.
155 </para> 155 </para>
156 156
157 </directive> 157 </directive>
158 158
159 </section> 159 </section>
160 160
161 161
162 <section id="arguments" name="Request and Response Arguments"> 162 <section id="arguments" name="Request and Response Arguments">
163 <para> 163 <para>
164 Each HTTP nginScript handler receives two arguments, request and response. 164 Each HTTP njs handler receives two arguments, request and response.
165 </para> 165 </para>
166 166
167 <para> 167 <para>
168 The request object has the following properties: 168 The request object has the following properties:
169 <list type="tag"> 169 <list type="tag">