如何利用 Service Fabric 自动刷新?
How can I take advantage of ServiceFabric Autorefresh?
我最近读到有关 ServiceFabric 提供某种自动刷新模式的信息,考虑到它的基础架构和集群独立 运行。
所以,根据我写的,我需要做的就是进入我的项目,检查属性并将 "Application Debug Mode" 设置为 Refresh Application
。
基本上这就是我现在所做的,但我看不出有什么不同。根本没有重新打包。
我是否必须 运行 在后台使用某种 cmdlet,例如webpack watch
?
The docs 解释 刷新应用程序 如下。
Refresh Application This mode enables you to quickly change and debug
your code and supports editing static web files while debugging. This
mode only works if your local development cluster is in 1-Node mode.
This is the default Application Debug Mode.
在其他 application debug 选项中,Visual Studio 创建一个包并将其部署到集群并将应用程序注册到 Service Fabric 上的 运行,软件包将包含 运行 应用程序所需的所有已编译二进制文件。
Refresh Application 和其他的主要区别在于,创建的包是符号 link 到 Dev 机器中的源代码,你不是实际上用二进制文件复制包,当你更改静态文件时,它将与 SF 中部署的应用程序使用的文件相同,这将使更改更加灵活,而无需在每次更改时重新打包、注册和部署应用程序。
PS: It does not work the same way as the watch feature for nodeJs development, it is just to avoid the package deployment. You could just reload the page though.
This post更详细的解释。
我最近读到有关 ServiceFabric 提供某种自动刷新模式的信息,考虑到它的基础架构和集群独立 运行。
所以,根据我写的,我需要做的就是进入我的项目,检查属性并将 "Application Debug Mode" 设置为 Refresh Application
。
基本上这就是我现在所做的,但我看不出有什么不同。根本没有重新打包。
我是否必须 运行 在后台使用某种 cmdlet,例如webpack watch
?
The docs 解释 刷新应用程序 如下。
Refresh Application This mode enables you to quickly change and debug your code and supports editing static web files while debugging. This mode only works if your local development cluster is in 1-Node mode. This is the default Application Debug Mode.
在其他 application debug 选项中,Visual Studio 创建一个包并将其部署到集群并将应用程序注册到 Service Fabric 上的 运行,软件包将包含 运行 应用程序所需的所有已编译二进制文件。
Refresh Application 和其他的主要区别在于,创建的包是符号 link 到 Dev 机器中的源代码,你不是实际上用二进制文件复制包,当你更改静态文件时,它将与 SF 中部署的应用程序使用的文件相同,这将使更改更加灵活,而无需在每次更改时重新打包、注册和部署应用程序。
PS: It does not work the same way as the watch feature for nodeJs development, it is just to avoid the package deployment. You could just reload the page though.
This post更详细的解释。