express-middleware-hypermedia
v0.0.1
Published
Express middleware for hypermedia api's
Downloads
1
Readme
express-middleware-hypermedia
Express middleware which allows you implement hypermedia REST api easily
Usage
var obj = {
name:'Aldi',
nationality:'German',
offices:145,
owner:'John O\'Melavo'
};
var halResponse = new HalResponse(obj)
.withLink(new Link().from("products","show products","/shops/1/products"))
.withLink(new Link().from("employees","show employees","/shops/1/employees"))
.withLink(new SelfLink().from("shop","/shops/1"));
hal.bind(res,halResponse)();
Above we can find an example of how we can build the body response
Links
- Build status travis-ci.org]
- Source code github.com]
- Bugs github.com]
License
Apache 2.0
To-do
This will be a good little project for me to start coding some utilities in node.js/javascript.
Contributors
Iván Corrales Solera [email protected]