This package has been deprecated

Author message:

Please

endpoints-model

0.1.2 • Public • Published

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.
});

Readme

Keywords

Package Sidebar

Install

npm i endpoints-model

Weekly Downloads

3

Version

0.1.2

License

none

Last publish

Collaborators

  • tkellen