Use serve to build a local server

Use serve to build a local server, the steps are as follows:

  1. Install serve globally: npm install -g serve.
  2. Start the local server: serve 目标文件夹.
    • serve target-folder
    • serve target-folder -p 3030. -p, specifying the port.
    • serve target-folder -C. -CAlternatively--core , cross-domain.

Related Links

The simple use of the NPM package serve, when the web server
node environment uses serve to publish the folder as a static service, and solve the service cross-domain problem

Guess you like

Origin blog.csdn.net/qzw752890913/article/details/126138694