The following content is based on Mac usage habits, please forgive me ~~~

brew

Specific installation, uninstallation, switching source, acceleration juejin.cn/post/693348…

node

// On a blank computer, first install NVM using BREW and then install Node using NVM
// Brew can be tried when the computer is not installed
curl -o- https:/ / raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
wget -qO- https:/ / raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash

Install the NVM Node version management toolBrew install NVM NVM install stable ## Install the latest stable version of Node, currently Node V9. 5. 0 (npm v56.. 0NVM install <version> ## install the specified version4.. 0, or NVM install V44.. 0, you can also install NVM4.4NVM uninstall <version> ## Remove the specified version that has been installed, NVM use <version> ## Switch to the specified version of node NVM ls ## list all installed versions of node NVM ls-remote ## List all installed versions of node NVM ls NVM alias <name> <version> ## Delete the defined alias NVM scanted-packages <version> ## Install the NPM package NVM alias globally under the current node versiondefault<version> ## Set the default Node versionCopy the code

npm

View the current NPM configuration. NPM config list Switch to NPX NRM use Taobao Switch to NPX NRM use NPM//. NPMRC file contents. The address can be set as the Intranet source
registry="https://registry.npm.taobao.org/"

// Obtain the local mirror source
npm get registry 

npm config set registry http://registry.npm.taobao.org/

yarn config set registry http://registry.npm.taobao.org/

Copy the code

Note: the NPX actuator will first check whether there is NRM locally, and then download one, and then switch the source

Yrm — NPM source manager

NPM install -g yrm List the optional source yrm ls NPM ---- HTTPS://registry.npmjs.org/
  cnpm --- http://r.cnpmjs.org/
* taobao - https://registry.npm.taobao.org/
  nj ----- https://registry.nodejitsu.com/
  rednpm - http://registry.mirror.cqupt.edu.cn/
  npmMirror  https://skimdb.npmjs.com/registry/
  edunpm - http://registry.enpmjs.org/
  yarn --- https://registry.yarnpkg.comSource switchover yrm use Taobao (using this will simultaneously switch the NPM and YARN source to Taobao) Yarn Registry has been set to: HTTPS://registry.npm.taobao.org/Source speed test YRM test NPM ---- 784ms CNPM -- 290ms * Taobao - 297ms NJ ----- FetchError
  rednpm - Fetch Error
  npmMirror  1353ms
  edunpm - Fetch Error
  yarn --- Fetch Error

Copy the code

yarn

// View the current source
yarn config get registry
// Set taobao source or Intranet source
yarn config set registry https://registry.npm.taobao.org --global
/ / source
yarn config set registry https://registry.yarnpkg.com --global

Copy the code

http-server

You can easily create an HTTP service

NPM I -g http-server Indicates the http-server -p portCopy the code