/mongoose-auto-api-models

Automatic Mongoose REST API - Module to generate models ☕ :: coffee, prod

Primary LanguageJavaScript

Mongoose Auto API - Models Module

Build Status npm version

Automatic Mongoose REST API - Module to generate models ☕

Install

  • npm i -S mongoose-auto-api.models

Model Setup

  • Model Setup - mongoose-auto-api.info
  • Returns object
    • modelName (String)
    • collectionName (String)
    • primaryKey (String)
    • allFields (Array)
    • listFields (Array)
    • encryptFields (Array)
    • encodeFields (Array)
    • schema (Object)
    • incField (String)
      • incrementing UID field
    • uidCollection (String)
      • UID increment collection
    • model (Object)
      • Mongoose model

Usage

models = require('mongoose-auto-api.models')