Nodejs Http-server--web front-end benefits

Source: Internet
Author: User

Many web front-ends may want to develop frequently in their daily development.

Sorry, that's wrong.

Many web front ends do not always have to be implemented in a server environment when they are being developed.

Like when you're using Angularjs's route module, etc...

And then you might go back under such software like Wampserver, and then start all sorts of failures .

Now, you just need three steps to get your page running in the server environment.

First, install Nodejs and npm

Second, use NPM to install http-server

PS: A lot of people use window to open the command line always want to find a CD file, in fact, under the current need to press and hold shift+ the right mouse button can have the command line opened.

Using NPM Download: NPM install http-server-g//-g Global Installation

  

I have installed, so the display may not be the same, you can find the Http-server location below.

In fact, do not know the installation location is irrelevant .

Open command line execution http-server in the current file you need to run on the server

  

Now the above two URLs, you randomly choose a browser access on the OK spicy, is the server environment pull.

Nodejs Http-server--web front-end benefits

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.