Nodejs Package.json

Source: Internet
Author: User

In the Nodejs project, use the Package.json file to declare the modules used in the project so that when the new environment is deployed, you can install the required modules as long as you execute the NPM install command in the same directory as the Package.json file.

The items that can be configured in the Package.json file are:names (name)、Application Description (description)、version number (versions)、applied configuration item (config)、author (author)、Resource Warehouse address (repository)、Authorization Method (licenses)、Catalogue (Directories)、Application Portal file (main)、command-line file (BIN)、Application dependent module (dependencies)、Development Environment Dependency module (devdependencies)、run engine (engines)Andscript (scripts)such as

The default is as follows:

{"Name": "Application-name", "Version": "0.0.1", "private": true, "scripts": {"Start": "Node App"}, "Dependenc ies ": {" Express ":" 3.1.0 "," Jade ":" * "}}

The key is the Dependencies node, which configures the list of modules that the application depends on.


Nodejs Package.json

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.