jbuck / express-persona

Mozilla Persona integration for Express
http://jbuck.github.com/express-persona
BSD 2-Clause "Simplified" License
66 stars 16 forks source link

The example code is out of date. #14

Closed meteormatt closed 10 years ago

meteormatt commented 10 years ago
PS D:\workspace_git\express-persona\examples> node .\server.js
Warning: express.createServer() is deprecated, express
applications no longer inherit from http.Server,
please use:

  var express = require("express");
  var app = express();

connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0

D:\workspace_git\express-persona\examples\server.js:22
  var addy = app.address();
                 ^
TypeError: Object function app(req, res, next){ app.handle(req, res, next); } has no method 'address'
    at Server.<anonymous> (D:\workspace_git\express-persona\examples\server.js:22:18)
    at Server.g (events.js:175:14)
    at Server.EventEmitter.emit (events.js:92:17)
    at net.js:1052:10
    at process._tickCallback (node.js:415:13)
    at Function.Module.runMain (module.js:499:11)
    at startup (node.js:119:16)
    at node.js:901:3

snap1

I think the express is already updated to 3.0 version. And there is no app.address() function now.