Server rendering template, how to hot update the front end

the server uses koa , uses pug template engine, and renders the template in the way of ctx.render ("layout", data) ). How to refresh the front-end page automatically after changing the front-end pug , less , js files?


how to automatically refresh the front-end page after changing the front-end pug, less, and js files?
  1. automatic updates and hot updates are not the same problem.
  2. this is not just a front-end automatic update problem, the template data must follow the back-end data. So the problem becomes how to update the front and back end automatically.
  3. you can use gulp to monitor files, gulp-nodemon to automatically restart the backend, and gulp-livereload to automatically update the front end.

have you seen this technology anywhere else? Update the static file in real time after modification. That's not about asking for static files all the time.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1be7954-31008.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1be7954-31008.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?