I've started playing with node.js and express.js and wrote an hello-world app following the docs:
app.get('/hello', function(req, res){
res.send('Hello World');
});
If I change the code and refresh the browser - nothing happens.
I have to stop the server and run it again.
Is there a solution for that?
Yes, you do have to stop it and start it again.
There are apps that do this automatically for you. Check out nodemon for example: https://github.com/remy/nodemon
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.