Create a local micro-services

Local open files when using vscode time in the form of a local file path, for some full page can not be displayed, so you need to use network address in the form of open

http-server node provides to open the file in the form of network address

First need to download and install the node and npm

1, http-server installation

  

npm install http-server -g

Using the command line input in to open the folder after the installation is complete

http-server

Note that the use of port numbers

The default port is 8080, even if the network will have two addresses, if not connected to a network, then 127.0.0.1:8080

If the port number is occupied, then open the Address would be the case when the downloaded files, then modify a port number on it

http-server -p 8083

Once again open the port when the number becomes 8083 through 8083 can be a normal visit

Guess you like

Origin www.cnblogs.com/wyongz/p/11199474.html