简单的零配置命令行HTTP服务器

HTTP -server是基于nodeJs的一个简单零配置命令行HTTP服务器。

简单的零配置命令行HTTP服务器插图亿华云

nodeJs 的 web-server.Js:

安装 (全局安装加 -g) :

npm install http-server

Windows 下使用:

在站点目录下开启命令行输入
http-server

和package.json一起使用

scripts“:{start“:http-server -a 0.0.0.0-p 8000“,}

参考:

-p 端口号(默认8080-IP地址(默认为0.0.0.0-d显示列表(默认状态为“True”)-i显示自动索引(默认状态为“true”)- e -- ext,如果没有提供默认的文件扩展名(默认的‘ html’)-s or--silent 禁止使用日志管理信息进行输出--Corssomething cors allows the origin to nod through access control-o 在开始服务后打开浏览器-C set the cache time (seconds)for the cache control maximum age header, eG.-c10 10seconds(default:3600).如果已禁用缓存,-C-1- U something --UTC something UTC something something something something something log something Por-- proxy all requests that can not be resolved locally to the given url.e[UNK] g.[UNK]-P http://someurl.Com-s or -- ssl something https-c or -- Cert ssl cert something (default: Cert) .PEM) - K or --SSLkey file key path (default: key).Pem).-r or -- robots provides a /robots.Txt (its content defaults to "user agent: * \ n default: /") - H or -- help print the above list and exit

以上就是关于“如何使用Ubuntu 配置webdav服务器”的相关解答,若有不清楚的可以咨询亿华云亿华云作为云南为数不错持有ICP/ISP/IDC等资质专业云计算提供商之一,成本控制良好,性价比高!提供各类云服务器产品及ICP备案一站式服务,操作简单快捷,7*24小时不间断售后运维技术支持,专业备案团队全力支持。
产品购买地址:https://www.i658.com/buy.html

THE END
Copyright © 2024 亿华云