Every time I try to do some modification in my app.js
file I have to close and start the server for the modifications to take effect, would I have some way to restart automatically after a change? like in php.
Example:
var http = require('http');
var server = http.createServer(function(request, response){
response.writeHead(200, {"Content-Type": "text/html"});
response.write("<h1>Hello World!</h1>"); // <-- se mudar o texto no F5 não atualiza.
response.end();
});
var servidorLigou = function () {
console.log('Servidor Hello World rodando!');
};
server.listen(3000,servidorLigou);