Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Express break server #6

Open
starburst997 opened this issue Jan 28, 2015 · 4 comments
Open

Express break server #6

starburst997 opened this issue Jan 28, 2015 · 4 comments

Comments

@starburst997
Copy link
Contributor

Package says to use Express 4 but this doesn't works.

Might I suggest using: https://github.com/zentuit/apiserver/commits/master fixes

@benlowry
Copy link
Member

I just ran all the tests using Express 4.11.1 and I'm not seeing any errors, was this resolved upstream since zentuit's source which uses 4.10.4? Are you able to reproduce the issue with 4.11.1?

@starburst997
Copy link
Contributor Author

Retried with the latest GIT version:

/var/www/html/Playtomic2/web.js:8
var 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'
    at Object.<anonymous> (/var/www/html/Playtomic2/web.js:8:19)
    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:906:3

createServer has been deprecated in 4, it should be

express();

There is a few other quirks that has been fixed in zentuit's source.

@benlowry
Copy link
Member

I don't have an ETA but @zentuit just got back to me by email and said he can do a pull request after he finishes up some stuff.

@zentuit
Copy link
Contributor

zentuit commented Jan 31, 2015

Pull request sent.

Ben - the tests will all pass since they are just testing the api, not the node server (express) underneath. I haven't added any tests for web.js (and router.js). That would probably be a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants