DEV Community

Discussion on: Automatically refresh the browser on Node / Express server changes 🚀

Collapse
 
ali_dot_ali profile image
Ali Ali

I did the same but its not reloading my files. I am using ejs.
//Newbie

Collapse
 
faridanthony profile image
Fred Anthony

"From now on, run the server with npm run watch instead of npm start."

Collapse
 
emasuriano profile image
Ema Suriano

Most probably is because by default nodemon watch for .js, .mjs, .coffee, .litcoffee, .json extensions. Therefore you can send the flag of -e ejs to the command of watch to make it watch your files :)

Collapse
 
sadkodev profile image
sadko

Config package.json thus. "dev": "nodemon --ext * ' js,html,ejs,css,scss" app.js"

Great...