npm install grunt-cli -g
install node mon
npm install grunt-nodemon -save-dev
add gruntfile.js to root of project
// gruntfile.js
module.exports = function (grunt) {
grunt.initConfig({
nodemon: {
all: {
script: 'server.js',
options: {
watchedExtensions: ['js']
}
}
},
});
grunt.loadNpmTasks('grunt-nodemon');
grunt.registerTask('default', ['nodemon']);
};
No comments:
Post a Comment