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 literallynjsorQuickJS, andnjsis 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 thenjsversion 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 typescript.jsand-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
- ubuntu stonking: njs 1.0.0-3 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms