node.js - Cant find methods in Express -
i have node js code this: var express = require('express') , app = express.createserver(); app.use(express.bodyparser()); app.post('/', function(request, response){ console.log(request.body); // json response.send(request.body); // echo result }); app.listen(3000); when run error this: , app = express.createserver(); ^ typeerror: object function createapplication() { var app = function(req, res, next) { app.handle(req, res, next); }; mixin(app, proto); mixin(app, eventemitter.prototype); app.request = { __proto__: req, app: app }; app.response = { __proto__: res, app: app }; app.init(); return app; } has no method 'createserver' @ object.<anonymous> (/users/anto_belgin/programs/node/appleconnect.js:2:19) @ module._compile (module.js:456:26) @ object.module._extensions..js (module.js:474:10) @ module.load (module.js:356:32) @ function.module._load (module.js:312:12) ...