Learn notes-Create a Nodejs project using the cmd command line

Source: Internet
Author: User

To create a Nodejs project using the cmd command line

1) under DOS CD go to the path where you want to create the project.
2) mkdir sing (Create a Sing folder)
3) CD Sing
4) NPM init (initialization project)

At this time need to fill out some project information, you can fill in according to the situation, of course, you can return.

5) Install a third-party package (the module of the package will be called directly by the program later)

Description: Because the HTTP module, the FS module, are built-in packages, no additional additions are required.

Install the Cheerio package here, and request package.

In DOS, the CD enters the Sing folder, and then
NPM Install Cheerio–save

After installing the Cheerio package, continue installing the request package, NPM install Request–save

Description: NPM (Nodejs Package Manager), Nodejs Pack Manager;
The purpose of –save is to write a project's dependency on the package to the Package.json file.

Reference Original: http://blog.csdn.net/yezhenxu1992/article/details/50820629

Learn notes-Create a Nodejs project using the cmd command line

Related Article

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.