node express 创建时TypeError: express.createServer is not a function
安装了Express
//test.js 脚本
var express=require('express');
var app=express.createServer();
app.get('/',function(req,res){
res.send('welcome to Node Twitter');
})
app.listen(8000);
为什么呀?我这是看书上代码敲的,但是百度到的教程完全不同http://blog.csdn.net/jonahzheng/article/details/33758645
谁能告诉我书上的要怎么弄才对,百度上的又是什么意思?
What you are looking at should be the very old 2.0 document.
Your first screenshot shows that 4.14.0 is installed
So take a look at the official documentation http://expressjs.com/
or the Chinese translation http://www.expressjs. com.cn/