you have to use server.close() not app.close()..
var express = require('express')
, http = require('http')
, app = express()
, server = http.createServer(app)
app.get('/',function(req,res){
...
})
server.listen(8000,'127.0.0.1',function(){
server.close(function(){
server.listen(8001,'192.168.0.202')
})
})
should work
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…