0.1.2 • Published 10 years ago

endpoints-model v0.1.2

Weekly downloads
3
License
-
Repository
github
Last release
10 years ago

endpoints-model Build Status

model layer for the endpoints framework

NPM

a quick and dirty extraction of some tools i use all the time for building rest apis.

Example

const Model = require('endpoints-model');
const Knex = require('knex')({
  client: "pg",
  connection: {
    host: "localhost",
    user: "user",
    database: "db",
    password: "pass"
  },
});
const BaseModel = Model({
  Bookshelf: require('bookshelf')(Knex),
  Validator: require('checkit'),
  linkPrefix: '/api/v1' // when a model is serialized, the automatically generated `links` key may need a prefix to produce the correct endpoint URL.
});
0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago