Mercurial > hg > nginx-site
annotate xml/en/docs/njs/cli.xml @ 2865:0d355d154181
Corrected syntax of ssl_conf_command and friends.
Each directive takes exactly two arguments: command name and value.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 23 Jun 2022 14:00:09 +0400 |
parents | bb0a2fbdc886 |
children |
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" |
2521
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
12 rev="4"> |
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 |
2521
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
32 >> globalThis |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
33 global { |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
34 njs: njs { |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
35 version: '0.3.9' |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
36 }, |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
37 global: [Circular], |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
38 process: process { |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
39 argv: [ |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
40 '/usr/bin/njs' |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
41 ], |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
42 env: { |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
43 PATH: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
44 HOSTNAME: 'f777c149d4f8', |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
45 TERM: 'xterm', |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
46 NGINX_VERSION: '1.17.9', |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
47 NJS_VERSION: '0.3.9', |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
48 PKG_RELEASE: '1~buster', |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
49 HOME: '/root' |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
50 } |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
51 }, |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
52 console: { |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
53 log: [Function: native], |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
54 dump: [Function: native], |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
55 time: [Function: native], |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
56 timeEnd: [Function: native] |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
57 }, |
bb0a2fbdc886
Updated example in njs cli.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
2286
diff
changeset
|
58 print: [Function: native] |
2245
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
59 } |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
60 >> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
61 </example> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
62 </para> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
63 |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
64 </section> |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
65 |
87a0e2c73a25
Refactored njs documentation.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
diff
changeset
|
66 </article> |