kukko kukko - 1 month ago 6
Node.js Question

NodeJS disable cache

I now learning NodeJS and I want to use Mustache-express as the template engine (I want to use it instead of Pug, because I used it before on FrontEnd and I think it's a really smart and easy template system). I use nodemon to run the NodeJS server and it's work correctly, it restart every time when I change any file, except the views. When I change anything in the view files, I don't seem it in the requests' responses, only when I restart the NodeJS server. What can I do with that?

I already turned out the cache with the following code:



Run nodemon with the command nodemon -e js,html (if the extension of your views is not html, then eventually replace it)