Module ngx_http_js_module
- Known Issues
- Example Configuration
- Directives
- js_include
- js_content
- js_set
- Request and Response Arguments
The ngx_http_js_module
module is used to implement location and variable handlers in nginScript — a subset of the JavaScript language.
This module is not built by default, it should be compiled with the nginScript module using the --add_module
configuration parameter:
1 | ./configure --add-module=<code><i>path-to-njs</i></code>/nginx |
The repository with the nginScript module can be cloned with the following command (requires Mercurial client):
1 | hg clone http://hg.nginx.org/njs |
This module can also be built as dynamic:
1 | ./configure --add-dynamic_module=<code><i>path-to-njs</i></code>/nginx |