HTTP 文件服务器 http-watcher.zip

  • C6_262907
    了解作者
  • 8.3KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-03 02:50
    上传日期
HTTP 文件服务器 http-watcher ,一个用GO开发的 HTTP 文件服务器,特殊之处在于它同时会监控文件系统改动,当发现文件变化后,自动...
http-watcher.zip
  • http-watcher-master
  • preprocess
    1.8KB
  • http-watcher.go
    11.8KB
  • README.md
    2.1KB
  • constants.go
    4.3KB
内容介绍
# HTTP Watcher A server that automatically reload browsers when file changed, help developers focus on coding. No copy and paste javascript code needed, just start `http-watcher`, that's all. > Web Server for Web developers! HTTP Watcher = HTTP file Server + HTTP proxy + Directory Watcher: automatically reload connected browsers when file changed, works for both static and dynamic web project. ### build ```sh # go get github.com/howeyc/fsnotify go build # you may want to copy http-watcher binary to $PATH for easy use. prebuilt binary comming soon ``` ### Usage ```sh http-watcher args # acceptable args list below, -h to show them ``` ```sh -command="": Command to run before reload browser, useful for preprocess, like compile scss. The files been chaneged, along with event type are pass as arguments -ignores="": Ignored file pattens, seprated by ',', used to ignore the filesystem events of some files -monitor=true: Enable monitor filesystem event -port=8000: Which port to listen -private=false: Only listen on lookback interface, otherwise listen on all interface -proxy=0: Local dynamic site's port number, like 8080, HTTP watcher proxy it, automatically reload browsers when watched directory's file changed -root=".": Watched root directory for filesystem events, also the HTTP File Server's root directory ``` ### HTML + JS + CSS (static web project) ```sh http-watcher -port 8000 -root /your/code/root ``` ### Dynamic web site: Clojure, golang, Python, JAVA ```sh # your dynamic site listen on 9090 # http-watcher act as a proxy http-watcher -port 8000 -root /your/code/root -proxy=9090 -ignores test/,classes ``` ### HTTP file server, no filesystem monitoring ```sh # like python -m SimpleHTTPServer, should handle concurrency better http-watcher -monitor=false ``` ### Web browser ### Add the following HTML code to your `index.html`: ``` <script src="http://127.0.0.1:8000/_d/js"></script> ``` Manually reload the page in your browser. The browser Javascript console should display a message like: `http-watcher reload connected`. From that point on, any file changes should cause the page to be automatically reloaded.
评论
    相关推荐
    • http服务器学习
      学习http的get与post方法的学习,可以参考
    • 个人http服务器
      一款模拟http协议软件,可用于更新软件,网站及共享资源用
    • HTTP傻瓜服务器
      简单、明了的风格所创作的HTTP服务器,针对于大部分HTTP服务器来说,更为简单,容易上手。软件很小,但是web功能非常齐全。
    • http服务器
      http服务器
    • HTTP小型服务器
      HTTP小型服务器 适合局域网用 互传东西特别好用 英文版的
    • http代理服务器
      简单的http代理服务器 蛮好用的 可以在浏览器中测试
    • http服务器
      基于VC的http服务器,适合初学者,基于VC的http服务器,适合初学者
    • http简易服务器
      利用http制作的轻量级服务器项目,亲测可用,。。。。。。
    • http文件服务器
      一款非常不错的http文件服务器http开发必备,推荐下载。
    • 搭建自己的服务器HTTP
      呵呵。。。简单好用的HTTp服务器,软件类的,呵呵。。。抓鸡必备,也可以暂时性的当网站用