NodeJS 最快速搭建一个HttpServer anywhere

anywhere 会自动打开index.html

npm install anywhere -g

cd

想要以某个路径作为静态文件服务器的根目录分享,只需要在该目录下执行:

anywhere 

默认不添加 -s 命令会在命令敲击后,同时打开浏览器访问 http://ipv4地址:8000/ 这个路径。

anywhere -p 8000 // 指定静态服务器的端口号  
anywhere -s // 静默执行,不打开浏览器  

https://www.cnblogs.com/mrblue/p/6149849.html

NodeJS 最快速搭建一个HttpServer

node.js最快速搭建一个HttpServer

先下载 http-server

npm install http-server -g

在目录里放一个index.html

1

2

cd D:\Web\InternalWeb

start http-server -i -p 8081 -a 127.0.0.1

猜你喜欢

转载自blog.csdn.net/love_hot_girl/article/details/83660484