亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

node里https模塊出現

node里https模塊出現

代小代 2016-09-04 12:50:19
fs.js:427? return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);?? ? ? ? ? ? ? ? ^Error: ENOENT, no such file or directory 'ssh_key.pem'? ? at Object.fs.openSync (fs.js:427:18)? ? at Object.fs.readFileSync (fs.js:284:15)? ? at Object.<anonymous> (/Users/lichao/Desktop/nodeStudy/https.js:5:9)? ? at Module._compile (module.js:456:26)? ? at Object.Module._extensions..js (module.js:474:10)? ? at Module.load (module.js:356:32)? ? at Function.Module._load (module.js:312:12)? ? at Function.Module.runMain (module.js:497:10)? ? at startup (node.js:119:16)? ? at node.js:902:3源碼為:var https=require('https');var fs=require('fs');var options={ key:fs.readFileSync('ssh_key.pem'), cert:fs.readFileSync('ssh_cert.pem')}https.createServer(options,function(req,res){ res.writeHead(200); res.end('Hello zhdail')}).listen('8080')
查看完整描述

3 回答

已采納
?
_瀟瀟暮雨

TA貢獻646條經驗 獲得超225個贊

文件路徑有問題吧,當前目錄是./

查看完整回答
1 反對 回復 2016-09-04
  • 3 回答
  • 0 關注
  • 2258 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號