0

I'm just starting with node.js and express.js and trying to create a listener with port 3000 using app.listen(3000).

The problem I'm having is when I first load the app, the browser loads it just fine, but when I make some changes, save the file and reload the browser, it doesn't show any changes. Mean it is just showing the first loaded version.

I have read many Q/A but none provide the specific solution. I don't know what I'm missing or doing wrong. Any help would be much appreciated, or please let me know if I explained my question properly.

Abdul R.
  • 290
  • 1
  • 3
  • 14

3 Answers3

2

You are looking for a tool like nodemon which does the server reloading. Unfortunately, nodemon doesn't reload the page itself, you still have to do it manually. Perhaps browsersync can help with that: it can be used for frontend development with live reloading, but I'm not sure if it works for fullstack reloading. The setup may depend on your pipeline (gulp/webpack/...), see for instance, this post for nodemon + gulp + browsersync combination.

YakovL
  • 7,557
  • 12
  • 62
  • 102
1

you have to restart the server or install nodemon

0

This might be a problem with your computer console, probably be an old mac, because I face the same problem as well, try and destroy all node action by using killall node for mac and for window computer taskkill /im node.exe /F this will terminate all node action on your computer, after restart the node server this should work if it doesn't kindly comment below

phemieny7
  • 803
  • 7
  • 21