Constructor
new CORE(resources, options)
Contructs a new Core instance
Parameters:
| Name | Type | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
resources |
Object | Periodicjs shared resources Properties
|
||||||||||||||||||
options |
Object | Configurable options for adapters and overrides Properties
|
- Source:
Methods
initialize_db(options) → {Object}
Initializes database adapters for each given model in configuration and assigns them to the this.db object indexed by model name and assigns a default mongo adapter to the .default property on this.db
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
options |
Object | Configurable options for db adapters (see periodicjs.core.data for more details) Properties
|
- Source:
Returns:
"this"
- Type
- Object
initialize_protocol(options, utilitiesopt) → {Object}
Initializes a protcol adapter and assigns it to the .protocol property on "this". The active protocol adapter is used for sending responses to the client and for setting up an API strategy
Parameters:
| Name | Type | Attributes | Default | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Configurable options for protocol adapter (see periodicjs.core.protocols for more details) Properties
|
||||||||
utilities |
Object |
<optional> |
CoreUtilities | A set of utility methods that should be accessible by protocol adapter |
- Source:
Returns:
"this"
- Type
- Object
initialize_responder(options) → {Object}
Initializes a responder and assigns it to the .responder property on "this". The active responder will also be used as the responder for any protocol adapters initialized after this is called
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
options |
Object | Configurable options for responder (see periodicjs.core.responder for more details) Properties
|
- Source:
Returns:
"this"
- Type
- Object