@@ -1870,72 +1870,59 @@ macOS
18701870Node.js
18711871=======
18721872
1873- Unit's npm-hosted Node.js
1874- `module <https://www.npmjs.com/package/unit-http >`__
1875- is called
1876- :program: `unit-http `.
1877- Install it
1878- to run Node.js apps on Unit:
1873+ Unit's npm-hosted Node.js `module <https://www.npmjs.com/package/unit-http >`__
1874+ is called :program: `unit-http `.
1875+ Install it to run Node.js apps on Unit:
18791876
18801877#. First, install the **unit-dev/unit-devel **
1881- :ref: `package <installation-precomp-pkgs >`;
1882- it's needed to build :program: `unit-http `.
1878+ :ref: `package <installation-precomp-pkgs >`; it's needed to build :program: `unit-http `.
18831879
1884- #. Next, build and install :program: `unit-http ` globally
1885- (this requires :program: `npm ` and :program: `node-gyp `):
1880+ #. Next, build and install :program: `unit-http ` globally (this requires
1881+ :program: `npm ` and :program: `node-gyp `):
18861882
18871883 .. code-block :: console
18881884
18891885 # npm install -g --unsafe-perm unit-http
18901886
18911887 .. warning ::
18921888
1893- The :program: `unit-http ` module is platform dependent
1894- due to optimizations;
1895- you can't move it across systems
1896- with the rest of **node-modules **.
1897- Global installation avoids such scenarios;
1898- just
1899- :ref: `relink <configuration-nodejs >`
1889+ The :program: `unit-http ` module is platform dependent due to optimizations;
1890+ you can't move it across systems with the rest of **node-modules **.
1891+ Global installation avoids such scenarios; just :ref: `relink <configuration-nodejs >`
19001892 the migrated app.
19011893
1902- #. It's entirely possible to run
1903- :ref: `Node.js apps <configuration-nodejs >`
1904- on Unit
1905- without mentioning **unit-http ** in your app sources.
1906- However, you can explicitly use **unit-http ** in your code
1907- instead of the built-in **http **,
1908- but mind that such frameworks as Express may require extra
1894+ #. It's entirely possible to run :ref: `Node.js apps <configuration-nodejs >`
1895+ on Unit without mentioning **unit-http ** in your app sources.
1896+ However, you can explicitly use **unit-http ** in your code instead of the
1897+ built-in **http **, but mind that such frameworks as Express may require extra
19091898 :doc: `changes <howto/express >`.
19101899
1911- If you update Unit later,
1912- make sure to update the module as well:
1900+ .. warning ::
1901+
1902+ The :program: `unit-http ` module and :program: `Unit ` must have matching version numbers.
1903+
1904+ If you update Unit later, make sure to update the module as well:
19131905
19141906.. code-block :: console
19151907
19161908 # npm update -g --unsafe-perm unit-http
19171909
19181910 .. note ::
19191911
1920- You can also
1921- :ref: `configure <howto/source-modules-nodejs >`
1922- and
1923- :ref: `install <source-bld-src-ext >`
1924- the :program: `unit-http ` module from sources.
1912+ You can also :ref: `configure <howto/source-modules-nodejs >` and
1913+ :ref: `install <source-bld-src-ext >` the :program: `unit-http ` module from sources.
19251914
19261915.. nxt_details :: Working with multiple Node.js versions
19271916 :hash: multiple-nodejs-versions
19281917
1929- To use Unit with multiple Node.js versions side by side,
1930- we recommend
1918+ To use Unit with multiple Node.js versions side by side, we recommend
19311919 `Node Version Manager <https://github.com/nvm-sh/nvm >`__:
19321920
19331921 .. code-block :: console
19341922
19351923 $ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/:nxt_ph:`x.y.z <nvm version>`/install.sh | bash
19361924
1937- Install the versions you need
1938- and select the one you want to use with Unit:
1925+ Install the versions you need and select the one you want to use with Unit:
19391926
19401927 .. code-block :: console
19411928
@@ -1950,15 +1937,13 @@ make sure to update the module as well:
19501937 $ nvm use 18
19511938 Now using node :nxt_hint:`v18.12.1 <Note the version numbers>` (npm v8.19.2)
19521939
1953- Having selected the specific version,
1954- install the :program: `node-gyp ` module:
1940+ Having selected the specific version, install the :program: `node-gyp ` module:
19551941
19561942 .. code-block :: console
19571943
19581944 $ npm install -g node-gyp
19591945
1960- Next, clone the Unit source code
1961- to build a :program: `unit-http ` module
1946+ Next, clone the Unit source code to build a :program: `unit-http ` module
19621947 for the selected Node.js version:
19631948
19641949 .. code-block :: console
0 commit comments