Reputation: 3839
I have simple hello world nodejs express application and I just added grunt-nodemon that should watch changes on *.js files. Here is the console output I get when I run grunt
and then change some .js file:
Running "nodemon:dev" (nodemon) task
[nodemon] v1.3.7
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node server.js`
Example app listening at http://:::3000
[nodemon] restarting due to changes...
[nodemon] starting `node server.js`
Example app listening at http://:::3000
Is there a way to see timestamp prepended to each of these lines in console log? Eg.
18:44:21 - Running "nodemon:dev" (nodemon) task
18:44:21 - [nodemon] v1.3.7
18:44:21 - [nodemon] to restart at any time, enter `rs`
...
I'd like to see in console when was the last server restart. Here is my gruntfile.js:
module.exports = function (grunt) {
grunt.initConfig({
nodemon: {
dev: {
script: 'server.js',
options: {
ext: ['js']
}
}
}
});
grunt.loadNpmTasks('grunt-nodemon');
grunt.registerTask('default', ['nodemon'])
};
Upvotes: 1
Views: 798