深水王子(香港)有限公司 | Node.js 14.15.2 CentOS 8.2 64bit
Introduction of 深水王子(香港)有限公司

Help companies establish a standardized operation and maintenance system to realize the true value of operation and maintenance.

Node.js 14.15.2 CentOS 8.2 64bit
operating system version:CentOS 8.2 64bit Node.js version:14.15.2 All software uses the official download address, please rest assured; the services and instances have been configured to restart automatically.

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.

The default firewall is off.

 

【system login】

Install Xshell or CRT SSH remote connection tool on local personal computer,

 

  1. npm install module

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

 

  1. build the project

Enter the directory where the project is located, execute cnpm install&&npm run build, and the generated package will be in the dist folder.

 

  1. Startup project
  1. The service start command is configured in the serve field of scripts in the package.json file.
  1. G

 

"scripts": {

 "serve": "vue-cli-service serve",

 "build": "vue-cli-service build",

 "lint": "vue-cli-service lint"

 },

npm run serve

 

  1. Put the static file generated by dist into the application to start

 

  1. Start by pm2 management

 

  1. npm command

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

 

  1. package.json syntax

 

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.

 

Version

The version must be parsed by node-semver, and it is packaged in npm's dependencies. (If you want to use it yourself, you can execute npm install semver)

 

Description

Put introduction, string.

 

Keywords

Keyword, array, string.

License

license.

 

Repository

Specify where the code is stored.

 

Scripts

"Scripts" is a hash object composed of script commands, which are executed in different life cycles of the package. The key is the life cycle event, and the value is the command to be run.

 

Config

"config" hash can be used to configure cross-version parameters used in package scripts.

 

Dependencies

Dependency is a hash that specifies the version range for a set of package names.

 

devDependencies

Dependencies for test development.

 

[statement]

If there is a paid software in the image, please purchase the copyright according to the official instructions of the software. The company is not responsible for disputes arising from copyright issues.

The image operating system is customized by the company and has been repeatedly tested and verified. Please refer to the information in the product details for use. Free image is for customer experience use, and paid image is the cost of image making. Except for the default environment of the image itself, it does not contain any manual technical support.

Some paid images have security reinforcement, but the server is not guaranteed to be absolutely secure. There is no absolutely secure server in the Internet. Please do code security and cultivate good usage habits.

 

 

[after sales question]

For online technical support, configuration, debugging, troubleshooting, security reinforcement, security testing, high concurrency testing, load balancing, clustering, etc., please contact our company for technical consultation

CLICK HERE to view the detailed user guide for more information. For more information about the product, please visit the Product Page.