Basic use of http-server

installation

npm install http-server -g


use

  1. By the terminal enters the destination folder , then enter in a terminal http-serverif you see the following interface, it shows the success of the launch, we can access an address by any of
    Insert picture description here
  2. After accessing the address, the index.html file will be opened by default. If there is no index.html file in the target folder, an index will be opened. At this time, you need to manually click the xxx file to open it.

How to close

ctrl + c


data

https://blog.csdn.net/aa390481978/article/details/90770764

https://zhuanlan.zhihu.com/p/54343488

Guess you like

Origin blog.csdn.net/weixin_43974265/article/details/112402005