bee icon indicating copy to clipboard operation
bee copied to clipboard

Development mode - the templates are cached

Open cristian-sima opened this issue 10 years ago • 5 comments

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

cristian-sima avatar Feb 05 '16 18:02 cristian-sima

+1

novikk avatar Feb 11 '16 19:02 novikk

Yes please, it's very annoying having to restart every time.

cjf93 avatar Feb 12 '16 16:02 cjf93

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

goldalworming avatar Feb 24 '16 09:02 goldalworming

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

astaxie avatar Feb 26 '16 07:02 astaxie

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

sergeylanzman avatar Mar 11 '17 07:03 sergeylanzman