cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
401
Views
0
Helpful
1
Replies

Node CSF express 4.x

adrianchia
Beginner
Beginner

When I run the node component via

npm installcsf-3.0.6-168364.tar.gz

and

node node_modules/csf/csf.js

it shows

node_modules/csf/csf.js:105

app.configure(function() {

    ^

TypeError: Object function (req, res, next) {

    app.handle(req, res, next);

  } has no method 'configure'

    at Object.<anonymous> (/home/vagrant/jabber/node_modules/csf/csf.js:105: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

after digging around I found out that in express 4.x has removed app.configure(...) function. Is there any update on this?

https://github.com/visionmedia/express/blob/master/History.md

1 Reply 1

Geevarghese Cheria
Cisco Employee
Cisco Employee

Hi Adrain,

Express 4.x does not have configure method.

https://github.com/visionmedia/express/wiki/Migrating-from-3.x-to-4.x

Also, it doesn't have express.logger and express.bodyParser had been deprecated ages ago.

Reference - javascript - TypeError: Object function (req, res, next) { app.handle(req, res, next); } has no method 'configure' - Sta…

Thanks and Regards,

Geevarghese

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: