本地启动serve

  1. Open your terminal and type

npm install -g http-server

  1. Go to the root folder that you want to serve you files and type:

http-server ./

  1. Read the output of the terminal, something kinda http://localhost:8080 will appear.

Everything on there will be allowed to be got. Example:

background: url('http://localhost:8080/waw.png');

你可能感兴趣的:(本地启动serve)