我的要求:
//app.js Socket IO Test
var app = require('express').createServer(),
redis = require('socket.io/node_modules/redis'),
io = require('socket.io').listen(app);
我的错误:
Warning: express.createServer() is deprecated, express
applications no longer inherit from http.Server,
please use:
var express = require("express");
var app = express();
如何修改我的声明以避免此错误?我知道这种方法现在已被 Express 弃用,只是不确定需要将其更改为...
提前致谢!