node搭建最简单的服务

node环境肯定是需要的啦。

安装

npm install http-server -g

查看是否安装

http-server -v

启动服务

http-server -p 8081
这相当于在当前目录启动了个服务,浏览器输入 http://localhost:8081 可以看到当前目录下的文件列表。

猜你喜欢

转载自blog.csdn.net/enthan809882/article/details/111869332