#Changed
- bin filed
- scripts filed
- npm run start
- npm run shram
- npm run pwd
#NodeJS Project Name
count_sheep
#description
You may have heard the sleep advice from a parent or friend, “count sheep to fall asleep”. In fact this sleep theory may have originated when sheep herders would be kept up at night because they were concerned about their sheep and would count the herd as they lay in bed as a way to fall asleep. There is some debate around the effectiveness of counting sheep as a method for falling asleep, as counting can occupy your mind with an active process and actually keep you up rather than put you in a sleepy state.[1] However, you can try counting sheep as a way to fall asleep by following these steps.
#Function sheep_fn
var i = 1;
exports.num_sheep=function(){
console.log(i+++'只');
}
#Function count_sheep
var sheep = require("./sheep_fn.js");
setInterval(sheep.num_sheep,1000);
#bin folder
in package.json file "bin":{"ctsp":"./count_sheep.js"}
after install run "npm bin"see bin floder
had better use npm install count_sheep -g to install
run command ctsp that's ok to run