installation
npm install http-server -g
use
- By the terminal enters the destination folder , then enter in a terminal
http-server
if you see the following interface, it shows the success of the launch, we can access an address by any of
- 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