The NGINX Team wants to hear from you. Take the 2025 NGINX User Survey.

nginx JavaScript module

njs is an nginx module that extends the server's functionality through JavaScript scripting, enabling the creation of custom server-side logic and more.

Use cases

See examples for more njs use cases.

Basic HTTP Example

To use njs in nginx:

There is also a standalone command line utility that can be used independently of nginx for njs development and debugging.

Tested OS and platforms

Presentation at nginx.conf 2018