1.0.3 • Published 8 years ago

RESTLoader v1.0.3

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

Usage

$ npm install --save EikosPartners/RESTLoader
var app = express(),
    routes = [];
var loader = require("RESTLoader")
routes.push(require('./Module'));
loader.load(app,routes);

--------------------------------------------------
module a sample module
--------------------------------------------------
API: {

        '/sampleEndPoint/:id': {
            type: 'get',
            desc: 'sample get endpoint',
            responder: function (req, res, next) {
                source.get(loader.respond(req, res));
            }
        },
        '/sampleEndPoint/:id': {
            type: 'post',
            desc: 'sends a post to an endpoint',
            responder: function (req, res, next) {
                source.saveMany(req, next);
            }
        }
};
Linting
---

Linted with jshint

```bash
$ npm run lint

Testing

Tested with mocha

$ npm test

Documentation

Documented with jsdoc

$ npm run docs