0.0.1 • Published 8 years ago

express-middleware-hypermedia v0.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

express-middleware-hypermedia

Express middleware which allows you implement hypermedia REST api easily

Build Status

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

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 developer@wesovi.com