npm install http-server -g
使用方式:
cd D:\Folder
http-server
或者:
http-server D:\Folder
进阶用法:
http-server -a localhost -p 80
--cors
to send Access-Control-Allow-Origin:*
along with the response headers (ie when serving a json file)
npm install http-server -g
cd D:\Folder
http-server
http-server D:\Folder
http-server -a localhost -p 80
--cors
to send Access-Control-Allow-Origin:*
along with the response headers (ie when serving a json file)
本文标题:Node.js 快速文件服务器(基于 HTTP 的静态文件)
本文链接:https://www.haomeiwen.com/subject/trgisdtx.html
网友评论