-
Notifications
You must be signed in to change notification settings - Fork 140
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-resource will support express4? #87
Comments
+1. I want to ask this question as well. |
For what it's worth, I've written a similar module for Express 4.x: https://github.com/olalonde/resourcemap |
Seems to work here! 👍 |
Thanks @ milanvanschaik . I will start using it and I hope this project is still going! |
ditto on the express 4. The nested routes are broken as they're using express3's app.routes, which no longer exists. It crashes on that line: |
+1 need this badly... is anyone working on this anymore? |
@TylerBrock FWIW, I haven't felt the need to use express-resource anymore with the new Router functionality. It's quite easy to setup resource like routes. For example: function router() {
return new express.Router({
mergeParams: true, // inherit parent router's params
});
}
var logsRouter = router()
.get('/', logs.index);
var txsRouter = router()
.use(bodyParser.json())
.get('/:txID', txs.show)
.get('/:txID/logs', logsRouter)
.post('/', txs.create);
app.use('/txs', txsRouter) |
Thank you! It definitely is much easier to do now but it would still be nice to have loaders (you can probably accomplish this with middleware though. |
Hi,
looks handy express-resource, will it support express 4 too? thanks,
A.C.
The text was updated successfully, but these errors were encountered: