Install

curl -qL https://www.npmjs.com/install.sh | sh

Daemonize

pm2

npm install pm2@latest -g
pm2 start src/server.js --name my-app
pm2 start npm --name ${PWD##*/} -- run dev
pm2 status

pm2 restart {id} --name new-name # rename

pm2 startup # systemctl status pm2-root
pm2 save    # make running persistent => ~/.pm2/dump.pm2

config

https://pm2.keymetrics.io/docs/usage/application-declaration/

pm2 init simple

    module.exports = {
    apps : [{
        name   : "app1",
        script : "./app.js"
    }]
    }

forever

npm install -g forever
forever start -c "node server.js" .
forever list

@reboot /usr/local/bin/forever start /path/to/app.js # crontab

Node Package Manager

byGrok 2026 Language Cross-platform Auto-switch (.nvmrc/.node-version) Speed / Shell startup Per-project tools (npm/yarn/pnpm) Best for Popularity (approx.)
nvm Bash Yes (nvm-windows separate) Yes Slow (2-3s delay) No Beginners, traditional users Highest (~75k stars)
fnm Rust Yes Yes (fastest) Very fast (~instant) No Speed + simplicity High
Volta Rust Yes Yes (via package.json) Very fast Yes (pins npm/yarn/pnpm too) Teams, consistent tooling High
asdf Shell Yes Yes Medium No (plugins for others) Polyglot devs (multiple langs) Medium-High
n Bash macOS/Linux mainly No Fast No Minimalist, no shell mods Medium
nvs JS Yes Yes Medium No Windows focus, cross-platform Lower
  • Speed + easy → fnm
  • Full JS toolchain pinning → Volta
  • Multi-language → asdf
  • Classic → nvm

fnm

curl -fsSL https://fnm.vercel.app/install | bash
fnm install --lts

fnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression # Windows
eval "$(fnm env --use-on-cd --shell bash)"                              # Linux

fnm list
fnm use 24.14.0

volta

https://volta.sh/

curl https://get.volta.sh | bash
volta list
volta install node@18

nvm

https://github.com/nvm-sh/nvm

Frameworks

cd project
npm install -g vinext  --verbose
'DEBUG="true"' | Out-File -FilePath .dev.vars -Encoding utf8
vinext dev          # Hot Module Replacement, :3000
vinext build        # Production build
vinext deploy       # Build and deploy to Cloudflare Workers

Versions

byGrok npm v9 (~2022–2023) npm v10 (~2023–2025) npm v11 (~2025–2026)
Bundled 18 / 19 20 / 22 22+ / 24+
Minimum ≥14.17 ≥18.17 || ≥20.5 ≥18 / ≥20 / ≥22 (stricter)