当前位置:网站首页>Hot reload debugging

Hot reload debugging

2022-04-23 19:21:00 Handsome that handsome

Python Of Flask frame , Yes debug Pattern , Pass in at startup debug=True You can heat load (Hot Reload, Live Reload) 了 . That is, change the source code , After the save , Automatically trigger updates , Refresh on the browser . No killing process 、 The pain of restarting .

Gin Native does not support , But there are many additional libraries that can support . for example

github.com/codegangsta/gin
github.com/pilu/fresh

This time, , We use github.com/pilu/fresh .

go get -v -u github.com/pilu/fresh

After installed , Only need to go run main.go Change the order to fresh that will do . Every time you change the source file , The code will be recompiled automatically (Auto Compile).

end .

版权声明
本文为[Handsome that handsome]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210557450954.html