Mercurial > hg > nginx-site
annotate xml/en/docs/njs/cli.xml @ 2371:16bad57a412a
Fixed typos (ticket #1769).
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 17 Apr 2019 13:50:25 +0300 |
parents | b9144a131eff |
children | bb0a2fbdc886 |
rev | line source |
---|---|
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
1 <?xml version="1.0"?> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
2 |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
3 <!-- |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
4 Copyright (C) Nginx, Inc. |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
5 --> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
6 |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
8 |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
9 <article name="Command-line interface" |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
10 link="/en/docs/njs/cli.html" |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
11 lang="en" |
2286
b9144a131eff
Corrected example in njs Command-line interface.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2246
diff
changeset
|
12 rev="3"> |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
13 |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
14 <section> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
15 <para> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
16 njs scripts development and debugging can be performed |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
17 from the command-line. |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
18 The command-line utility is available after the installation of |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
19 the Linux <link doc="install.xml" id="install_package">package</link> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
20 or after building from the |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
21 <link doc="install.xml" id="install_sources">sources</link>. |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
22 Compared to njs running inside nginx, |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
23 nginx objects |
2246
32ba43abf9cd
Renamed njs API, njs Changes.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2245
diff
changeset
|
24 (<link doc="reference.xml" id="http">HTTP</link> and |
32ba43abf9cd
Renamed njs API, njs Changes.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2245
diff
changeset
|
25 <link doc="reference.xml" id="stream">Stream</link>) |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
26 are not available in the utility. |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
27 <example> |
2286
b9144a131eff
Corrected example in njs Command-line interface.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2246
diff
changeset
|
28 $ echo "2**3" | njs -q |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
29 8 |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
30 |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
31 $ njs |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
32 >> var o = {a:[]} |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
33 undefined |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
34 |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
35 >> JSON.stringify(o, undefined,1) |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
36 { |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
37 "a": [ |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
38 |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
39 ] |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
40 } |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
41 >> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
42 </example> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
43 </para> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
44 |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
45 </section> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
46 |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
47 </article> |