Reflect html changes in browser without restarting the express app

前端 未结 3 553
悲&欢浪女
悲&欢浪女 2021-01-12 19:21

I have an express app. I am using swig as the template engine. Is it possible to reflect my HTML changes in the browser when I click refresh. I don\'t want to restart the s

3条回答
  •  自闭症患者
    2021-01-12 20:04

    You can simply disable swig's caching:

    if (process.env.NODE_ENV !== 'production') {
      swig.setDefaults({ cache: false });
    }
    

提交回复
热议问题