NJS(1)

πŸ’– NJS(1) β€” like, the njs manual page, but make it make sense πŸ’–

okay bestie, so this is the njs(1) page from the User Commands section of the manual, and it's literally just JavaScript for Nginx. no cap. let's get into it πŸ¦‹


✨ NAME ✨

njs β€” JavaScript for Nginx πŸ‘‘


🌸 SYNOPSIS 🌸

njs [options] [-c string | script.js | -] [script args]

and also, important vibe check:

Interactive shell: disabled 🚫

like, she's not here to chat, she runs your script and dips πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

so the whole thing is: you hand njs your options, then either a string with -c, or a file called script.js, or a literal - (which means "read it from stdin, bestie"), and then if you want you can pass some script args after that. that's the shape of it, fr fr ✨

just remember the interactive shell is disabled β€” no little > prompt waiting for your thoughts, this is a run-and-done kinda girlie 🌈


🧚 OPTIONS 🧚

one bullet per flag, no skipping, we're doing all of them β€” periodt πŸ’…

  • -a β€” prints the AST. yes, the whole abstract syntax tree, look at your code's skeleton, iconic 🦴✨
  • -c β€” specifies the command to execute, like you're telling her exactly what to run, right here, right now πŸ’¬
  • -d β€” prints the disassembled code. peek at the guts, bestie πŸ”
  • -e <code> β€” sets the failure exit code. so when things go wrong, they go wrong your way 😌
  • -f β€” disabled denormals mode. that's the mode, and this turns it off, don't ask me to elaborate, it's literally in the flag 🚫
  • -j <size> β€” sets the maximum stack size, in bytes. give her some room to breathe 🫁
  • -m β€” loads as an ES6 module (the default is script, jsyk) πŸ“¦
  • -n njs|QuickJS β€” sets the JS engine. your choices are literally njs or QuickJS, and njs is the default πŸš—πŸ’¨
  • -p <path> β€” sets the path prefix for modules, so she knows where to go looking πŸ”Ž
  • -q β€” disables the interactive introduction prompt. skip the small talk, we're busy πŸƒβ€β™€οΈ
  • -r β€” ignores unhandled promise rejection. like, she's choosing peace ✌️
  • -s β€” sandbox mode. play safe, babes πŸ–οΈ
  • -v β€” prints the njs version and exits. quick lil flex and she's gone πŸ‘‹
  • -u β€” disables "unsafe" mode. the quotes are doing a lot of work there and I respect it 🫢
  • script.js | - β€” runs code from a file or from stdin. your choice, main character πŸ’«

heads up bestie: that - in the last option is literally a hyphen meaning stdin, not a placeholder. don't type script.js and - expecting both, it's one or the other, iykyk 😭

🌈 SEE ALSO 🌈

(the original page doesn't list any SEE ALSO references, so there's nothing to link here β€” just you and your scripts, alone together, as it should be πŸ’œ)


and that's the whole page, no crumbs left πŸ“

this was njs 1.0.0, dated August 2026, manual page NJS(1) β€” love her, respect her, run your JavaScript through her πŸ’…βœ¨ bye bestie!! πŸŽ€πŸ¦‹πŸ‘‘

πŸ“¦ where this page comes from