Skip to content

Instantly share code, notes, and snippets.



Last active Feb 24, 2017
What would you like to do?
# Node.js
# versions
node -v
node -p 'process.versions.v8'
# Install nodejs
# Using Debian, as root
sudo curl -sL | bash -
sudo apt-get update
sudo apt-get install -y nodejs
sudo apt-get install npm
# then updated using
#update system debian:
sudo apt-get update
# Fetches the list of available updates
sudo apt-get upgrade
# Strictly upgrades the current packages
sudo apt-get dist-upgrade
# Installs updates (new ones)
# update
apt-get update
npm update -g
#update all globally installed packages of npm
npm update -g
# updates all package.json dependencies which are marked to be updated (Not a fixed version)
npm update <--save/--save-dev>
# check outdated dependencies:
npm outdated
# Update packages in package.json file
npm install -g npm-check-updates
npm-check-updates -u
npm install
# Install packages:
npm install <--production/--dev>
# check globally installed npm packages
npm list -g --depth=0
• browser-sync
• # web components tester: npm i -g web-component-tester web-component-tester-istanbul
# V8 options - e.g. --use_strict (enforce strict mode)
node --v8-options | less
# e.g. options for garbage collection which is useful when mesasuring memory usage (because it allows manually forcing garbage collector from withen javascript):
node --v8-ptions | grep gc
# staged features flag
node --harmony -p '<command>'
# In progress features flag - specific to each feature
# show in progress features:
node --v8-options | grep "in progress"
# "v8" module:
# set at runtime using v8 module. After requiring it:
# show heap memory (dynamically allocate memory portion)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.