Slotos/passport-reddit

app has no method 'configure'

Closed this issue · 2 comments

npm list express
passport-reddit-examples-login@0.0.0 /opt/apps
└── express@4.7.2

express 4.0 doesn't have a configure method. You can either update package.json to not support version 4. or modify it as indicated here:
http://blog.tompawlak.org/new-features-node-express-4


Here is the error

node app.js

/opt/apps/app.js:55
app.configure(function() {
^
TypeError: Object function (req, res, next) {
app.handle(req, res, next);
} has no method 'configure'
at Object. (/opt/apps/app.js:55:5)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3

The fix is just to remove the app.configure function lines at 55 and 69 in https://github.com/Slotos/passport-reddit/blob/master/examples/login/app.js

Passport and, as an extension, this library works with express over three consecutive versions. This affects example and an integration test. Neither can be "fixed" by editing, but only by writing new examples. Due to real life constraints and fatigue I can only claim to write it "soon" in Valve time.

If you have a working example for express 4, I'd be grateful if you could add it as an additional example and request a merge.

Thank you.