Constructor
new ModelAPIExpress(optionsopt) → {ModelAPIExpress}
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
API configuration parameters
Properties
|
- Source:
Returns:
Created API application
- Type
- ModelAPIExpress
Members
SWAGGER_SUPPORT
SWAGGER_SUPPORT indicates that the module version supports the swagger
- Source:
Methods
expose(pathopt, middlewareopt, model, routerOptionsopt) → {ModelAPIExpress}
ModelAPIExpress.prototype.expose - exposes the mongoose model as RESTFull json service
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
path |
String |
<optional> |
the path to mount exposed model |
middleware |
function |
<optional> |
one or more middlewares that should be called before each end-point controller |
model |
Mongoose.Model | Mongoosee model to be exposed | |
routerOptions |
Object |
<optional> |
ModelAPIRouter configuration object (see [Router configuration](configuration.html#router)) |
- Source:
Returns:
itself
- Type
- ModelAPIExpress
urls() → {Array}
ModelAPIExpress.prototype.urls - returns avaliable list of end-points
- Source:
Returns:
list of end-points
- Type
- Array