Development mode - the templates are cached
Hi. I updated bee and the bee tool and it seams that on the "dev" mode, the application is caching the templates and it does not show the changes
This is a very serious problem, as I have to re-start the server for each modification inside a template
+1
Yes please, it's very annoying having to restart every time.
func (c *MainController) Rerender() {
beego.BuildTemplate(beego.BConfig.WebConfig.ViewsPath)
c.Redirect("/", 302)
}
I use this to rerender, it works in production too, sometimes I need to rerender html without restart it
create a bee.json under the project folder.
{
"version": 0,
"gopm": {
"enable": false,
"install": false
},
"go_install": false,
"watch_ext": [],
"dir_structure": {
"watch_all": false,
"controllers": "",
"models": "",
"others": []
},
"cmd_args": [],
"envs": [],
"database": {
"driver": "mysql"
}
}
you can add anything you want to rebuild for the watch_ext
beego cache templates in prod mode. Today in 1.8 version you have live reload html,tpl,js,css with web socket. If this still relevant, please reopen issue