gomon:监视服务器上的更改。 重新加载服务器并重新加载浏览器

时间:2021-03-09 16:08:38
【文件属性】:
文件名称:gomon:监视服务器上的更改。 重新加载服务器并重新加载浏览器
文件大小:748KB
文件格式:ZIP
更新时间:2021-03-09 16:08:38
Go Gomon 为什么有必要? 因为它还会在更改时刷新browser 。 它是如何工作的? 普通的:监视代码更改,重新加载指定的二进制文件(例如Web服务器),并通过WebSocket调用客户端以重新加载。 用法 设置客户端 将下面的脚本包括到您的客户端中,例如,一个静态的main.js并使用您选择的免费端口更改YOUR_PORT 。 默认端口是3000 。 function tryConnectToReload ( address ) { var conn ; // This is a statically defined port on which the app is hosting the reload service. conn = new WebSocket ( "ws://localhost:3000/sync" ) ; conn . onclose = f
【文件预览】:
gomon-master
----pkg()
--------reload()
--------surveillance()
--------browsersync()
--------configuration()
--------utils()
----docs()
--------gomon.gif(913KB)
----.github()
--------workflows()
----LICENSE(1KB)
----main.go(1KB)
----.gitignore(286B)
----go.sum(2KB)
----README.md(3KB)
----go.mod(375B)

网友评论