From: Dmitry Volyntsev Date: Wed, 4 Jun 2025 05:37:32 +0000 (-0700) Subject: Improved README.md clarity with angle bracket explanations. X-Git-Tag: 0.9.1~32 X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=5b791257e499fc5e76181121011415086735c094;p=njs.git Improved README.md clarity with angle bracket explanations. --- diff --git a/README.md b/README.md index 10ef0ba7..f81075ce 100644 --- a/README.md +++ b/README.md @@ -310,20 +310,30 @@ https://github.com/nginx/nginx.git ## Building NGINX JavaScript as a module of NGINX To build NGINX JavaScript as a dynamic module, execute the following commands from the NGINX source code repository's root directory: +> [!NOTE] +> Replace `` with the actual path to your NJS source directory. + ```bash auto/configure --add-dynamic-module=/nginx ``` To build with [QuickJS](https://nginx.org/en/docs/njs/engine.html) support, provide include and library path using `--with-cc-opt=` and `--with-ld-opt=` options: + +> [!NOTE] +> Replace `` with the actual path to your NJS source directory and `` with the actual path to your QuickJS source directory. + ```bash auto/configure --add-dynamic-module=/nginx \ - --with-cc-opt="-I" --with-ld-opt="-L" + --with-cc-opt="-I" \ + --with-ld-opt="-L" ``` > [!WARNING] > By default, this method will only build the `ngx_http_js_module` module. To use NJS with the NGINX Stream module, you'll need to enable it during the `configure` step so it builds with the NGINX binary. Doing so will automatically compile the `ngx_stream_js_module` module when NJS is added to the build. One way of accomplishing this is to alter the `configure` step to: +> > ```bash -> auto/configure --with-stream --add-dynamic-module=/nginx +> auto/configure --with-stream \ +> --add-dynamic-module=/nginx > ``` Compile the module