nodejs 各种插件
生活随笔
收集整理的這篇文章主要介紹了
nodejs 各种插件
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
__dirname:全局變量,存儲的是文件所在的文件目錄
__filename:全局變量,存儲的是文件名
代碼:
dirname.js
console.log(__dirname);
運行node dirname.js
輸出:D:\nodejs\src
代碼:
dirname.js
console.log(__filename);
運行node dirname.js
輸出:D:\nodejs\src\dirname.js //輸出帶路徑的文件名
step.js學習
http://blog.csdn.net/zhangxin09/article/details/13018739
mongodb學習
http://www.runoob.com/nodejs/nodejs-mongodb.html
node插件:node-schedule
節點時間表
http://www.cnblogs.com/ajun/p/3548259.html
如果你想說,“在每個月的第三個星期二的每個小時的20點和50點運行這個功能,你會發現節點計劃更適合你的需要。
const schedule = require('node-schedule');
var j = schedule .scheduleJob('42 * * * * *',function(){
console.log("又過去了一分鐘")
});
nodejs之async異步編程 轉載于:https://www.cnblogs.com/learnings/p/7763028.html
總結
以上是生活随笔為你收集整理的nodejs 各种插件的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: wampserver下升级php7
- 下一篇: 《秋江晚泊》是哪个时期的作品?