Mercurial > hg > nginx-site
diff xml/en/docs/njs/node_modules.xml @ 2629:5cd72684e5b8
Fixed typo and updated description in Using node modules.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Thu, 03 Dec 2020 12:28:46 +0000 |
parents | fca42223b9fc |
children |
line wrap: on
line diff
--- a/xml/en/docs/njs/node_modules.xml +++ b/xml/en/docs/njs/node_modules.xml @@ -9,7 +9,7 @@ <article name="Using node modules with njs" link="/en/docs/njs/node_modules.html" lang="en" - rev="5"> + rev="6"> <section id="intro"> @@ -351,12 +351,13 @@ Uint8Array [ </example> Now let's proceed further with njs: <example> -$ /njs ./njs_bundle.js +$ njs ./njs_bundle.js Uint8Array [0,0,0,0,12,10,10,84,101,115,116,83,116,114,105,110,103] </example> The last thing will be to use njs-specific API to convert array into byte string, so it could be usable by nginx module. -We can add the following snippet before the last line: +We can add the following snippet before the line +<literal>return frame; }</literal>: <example> if (global.njs) { return String.bytesFrom(frame)