init

npm install {package} - empty folder: will create node_modules/package-lock.json/package.json

Daemonize

pm2

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

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

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

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

Nuxt - Vue

https://nuxt.com/docs/4.x/examples/hello-world

Next.js - React

https://nextjs.org/docs/getting-started

vinext

https://github.com/cloudflare/vinext - Run Next.js applications on Vite, with Cloudflare Workers as the primary deployment target.

Versions

https://nodejs.org/en/about/previous-releases

npm

Feature / Metric npm v11 npm v12
Initial Release December 2024 / May 2025 July 2026
Bundled in Node.js Node.js 24 (LTS) & Node.js 25 Node.js 26 (Current)
Minimum Node.js Required (engines.node) >= 20.17.0 or >= 22.9.0 ^22.22.2 || ^24.15.0 || >= 26.0.0
Node.js 18 / 20 Support Node 18 dropped; Node 20 supported Node 18 & early Node 20 dropped
Notable Defaults & Security --ignore-scripts updated; parallel installation options allow-git and allow-remote default to "none"; unapproved scripts blocked by default