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

is middle ware working ? #2

Open
dagisky opened this issue Jul 31, 2015 · 5 comments
Open

is middle ware working ? #2

dagisky opened this issue Jul 31, 2015 · 5 comments

Comments

@dagisky
Copy link

dagisky commented Jul 31, 2015

var express = require('express');
var expressRest = require('express-rest');
......

var app = express(); // the server is created
var rest = expressRest(app);

rest.post('/api/pdl',function(req, rest) {
console.log("ok");
rest.ok("data sent");
});

// returns me error 500 it only works when using rest.get ...

thanks..

@SyRenity
Copy link

I confirm, gives me same trouble on Express 3

@alancnet
Copy link
Owner

Hey guys, sorry for the delay. Do you have a sample repository where this doesn't work? I am unable to reproduce in test.

@miguelalarcos
Copy link

@dagisky , @SyRenity , are you using app.use(bodyParser.json())? It gives me a 500 error if I use bodyParser, but it's ok if you don't use it

@miguelalarcos
Copy link

@alancnet , is this repository still alive? Thanks for the project, it's very useful.

@alancnet
Copy link
Owner

@miguelalarcos I would appreciate any PR's. A library like this needs contributors.

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

4 participants