Iris: Suggest It can be reload when the template html file is changed.

Created on 9 May 2020  路  1Comment  路  Source: kataras/iris

Edit the template html file.It need restart iris?

question

Most helpful comment

No, if you load them from physical directory you don't need to restart the whole Iris. You just need to set the Reload option to true.

https://github.com/kataras/iris/blob/b6ac39480bc98eab1d7f9dbe8ecb53be9851e848/_examples/view/template_html_0/main.go#L10-L11

If you load them from embedded content in your code then you should use the iris-cli and let it re-build the embedded data, reload your server and refresh your browser.

>All comments

No, if you load them from physical directory you don't need to restart the whole Iris. You just need to set the Reload option to true.

https://github.com/kataras/iris/blob/b6ac39480bc98eab1d7f9dbe8ecb53be9851e848/_examples/view/template_html_0/main.go#L10-L11

If you load them from embedded content in your code then you should use the iris-cli and let it re-build the embedded data, reload your server and refresh your browser.

Was this page helpful?
0 / 5 - 0 ratings