Server account information: The default administrator account of the CentOS system is root, and the default password is the password set by the newly purchased cloud host. If you need to reset the password, please log in to the Alibaba Cloud management console, find the left menu bar [Cloud Server ECS],Restart the instance after submission.
【system login】
Install Xshell or CRT SSH remote connection tool on local personal computer,
npm install module
npm install <Module Name> Install the module to the project directory
npm install <Module Name> -g Install the module to the global
Enter the directory where the project is located, execute cnpm install&&npm run build, and the generated package will be in the dist folder.
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
npm run serve
npm init initialization package.josn file
npm uninstall <Module Name> Uninstall module
npm update <Module Name> Update module
npm outdated <Module Name> Check if the module is out of date
npm start start the module (this command is written in the start field of the scripts of the package.json file, you can customize the command to configure a server environment and install a series of necessary programs, if there is no configuration, the node server.js is directly started by default)
npm stop Stop module
npm restart restart module
npm --version View npm version
npm ls View the modules installed in the current directory
pm2 start app.js start app project
pm2 list List all process information managed by pm2
pm2 logs Show all process logs
pm2 stop all stop all process
pm2 restart all restart all process
Name
The most important thing in package.json is the name and version fields. They are all necessary, if you don't have it you cannot install. The identifier composed of name and version is unique in the hypothesis. Changing the package should also change the version.
name is the name of this thing. note:
Don't put node or js in the name.