nodejs

Node.js Command Cheatsheet

Node.js Commands

node app.js
npm init
npm install
npm start
npm run

NPM Scripts

npm run build
npm run test
npm run lint
npm run dev

Node.js Debugging

node --inspect-brk app.js
node --inspect app.js
node --inspect=9229 app.js

Package Management

npm install --save
npm install --save-dev
npm uninstall
npm update
npm outdated

File System (fs)

fs.readFileSync('file.txt', 'utf8')
fs.writeFileSync('file.txt', 'Hello, Node.js')
fs.appendFileSync('file.txt', 'Appended text')
← Back to Cheatsheet