Learn how to use njs with NGINX as a Service for Azure
NGINX as a Service for Azure supports the open-source njs module, allowing the extension of NGINX functionality with a subset of the Javascript language.
Upload NGINX Configuration with njs
Create an njs script file by uploading a gzipped tar file or create the script file in the editor. See NGINX Configuration for a step-by-step guide.
Note: If specifying an abolsute file path as your njs script’s File path, see the NGINX Filesystem Restrictions table for the allowed directories an Auxiliary file can be written to.
Switch between language options to see syntax highlighting for NGINX configs or Javascript.
To use njs, enable the ngx_http_js_module module and specify the js_import directive with your njs file.
NGINXaaS will not parse, evaluate, or run any provided njs scripts when validating the NGINX configuration. Enable logging to monitor errors caused by njs scripts.