Node.js 14.15.2 CentOS 8.2 64bit
Jun 28, 2024
Uninstall module
npm update Update module
npm outdated 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 projectpm2 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
5.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">