Installation of the node. JS Framework Express

Source: Internet
Author: User

Installation of the node. JS Framework Express

First assume that you have node. js installed, then create a directory for your app, and then go to this directory and use it as your current working directory.

$ mkdir myapp$ cd myapp

npm initCreate a file for your app with the command package.json . For more information package.json on how this works, please refer to specifics of NPM's package.json handling.

$ npm init

This command will ask you to enter several parameters, such as the name and version of the app. You can simply press the "enter" key to accept the default settings, except for the following:

entry point: (index.js)

Type app.js or the name you want, which is the entry file for the current application. If you want to use the default index.js file name, just press the "enter" key.

Next, install Express and save it to the dependencies list:

$ npm install express --save

If you just install Express temporarily and don't want to add it to the dependency list, simply omit the --save parameters:

$ npm install express

When the Node module is installed, if a parameter is specified --save , the module is added to the package.json dependency list in the file dependencies . npm installall modules listed in the dependency list are then automatically installed by command.

Installation of the node. JS Framework Express

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.