一、使用node编写

使用express

二、使用serve

  1. npm i serve -g
  1. sudo npm i serve -g

image.png
注意需要在同一个局域网下
在需要开启的文件夹下,打开终端命令行,输入serve