场景: node:8.9.3版本 报错代码: Error: certificate has expired at TLSSocket.<anonymous> (_tls_wrap.js:1103:38) at emitNone (events.js:106:13) at TLSSocket.emit (events.js:208:7) at TLSSocket._finishInit (_tls_wrap.js:637:8) at TLSWrap.ssl.onhandshakedone (_t
server.js代码: // 内置http模块,提供了http服务器和客户端功能(path模块也是内置模块,而mime是附加模块) var http=require("http"); // 创建服务器,创建HTTP服务器要调用http.createServer()函数,它只有一个参数,是个回调函数,服务器每次收到http请求后都会调用这个回调函数.服务器每收到一条http请求,都会用新的request和response对象触发请求函数. var server=http.createS
server.js代码: // 内置http模块,提供了http服务器和客户端功能(path模块也是内置模块,而mime是附加模块) var http=require("http"); // 创建服务器,创建HTTP服务器要调用http.createServer()函数,它只有一个参数,是个回调函数,服务器每次收到http请求后都会调用这个回调函数.服务器每收到一条http请求,都会用新的request和response对象触发请求函数. var server=http.createS
昨天看了一个晚上的jade视频, 感觉就是我想要的东西, 相见恨晚, 赶紧在WebStorm这个IDE中,写代码,测试 /** * Created by xa87 on 2016/1/22. */ var http=require('http') var jade=require('jade') http.createServer(function(req,res){ jade.renderFile('./t2.jade',{'name':'标题 啊aaa'},function(err,html
app.js: var express = require('express'); var request = require('request'); var app = express(); /*request('http://127.0.0.1:8000/test.php', function (error,response,body) { if (!error && response.statusCode == 200) { console.log(body); } });*/ re
Hey everyone! This is the fourth post in my new node.js modules you should know about article series. The first post was about dnode - the freestyle rpc library for node, the second was about optimist - the lightweight options parser for node, the th