码迷,mamicode.com
首页 > 其他好文 > 详细

nodemon通过配置文件监视

时间:2020-12-29 11:30:58      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:ref   cal   current   blob   tar   配置文件   star   oca   slice   

https://github.com/remy/nodemon#config-files

https://github.com/remy/nodemon/blob/master/doc/sample-nodemon.md

{
  "watch": ["src"],
  "ext": "html,vue,js,scss,css",
   "events": {
    "start": "node printdate.js start",
	"restart": "node printdate.js restart"
  }
}

 

printdate.js

//console.log(process.argv);
var myArgs = process.argv.slice(2);
//console.log(‘myArgs: ‘, myArgs);

const dateTime = require(‘date-time‘);
var currentTime = dateTime({local: true, showTimeZone: true, showMilliseconds: true});
console.log(`${myArgs[0]} at ${currentTime}`)

 

nodemon通过配置文件监视

标签:ref   cal   current   blob   tar   配置文件   star   oca   slice   

原文地址:https://www.cnblogs.com/chucklu/p/14180189.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!