1.0.3 • Published 9 years ago

humming v1.0.3

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

marble-run

hapi plugin to generate CRUD routes for all models in a folder

use

var hapi = require("hapi");
var server = hapi.createServer();

server.connections({ port: 8000 });

server.register({
    register: require("marble-run"),
    options: {
        modelsPath: "/models",
        adapter: require("russian-doll")
    }

}, function (e) {

   server.start();
});

api

marble-run is registered using hapi's server.register(); method.

You may pass a modelsPath option to point marble-run at where to find your models.

You must pass an adapter option. The adapter must contain a function that takes a database and a collection parameter and returns an object with a .create, .update, .delete, and .findOne method.

license

MIT

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago