- Source:
Members
-
<static> community :module:community
-
Type:
- Deprecated:
- This is just a symlink to jive.community (use that instead). To be removed in next major version.
- Source:
-
<static> options
-
Service configuration options.
- Source:
-
<static> role
-
Interrogate the role of this node
- Source:
-
<static> routes
-
Public service routes
- Source:
Properties:
Name Type Description tiles
Object jive
Object dev
Object oauth
Object
Methods
-
<static> autowire(options) → {Promise}
-
Autowires the entire service. Service autowiring will setup:
- Public web assets such as html, javascript, and images available from the /public directory
- Public endpoints ('routes') shared by all components
- Public endpoints ('routes') for each service subcomponent
- Event listeners
- Recurrent tasks
- Execute serivce component bootstrap code
Parameters:
Name Type Description options
Object Autowiring options. If not present, all service components (tiles, apps, services, storage frameworks, etc.) will be autowired.
Properties
Name Type Description componentsToWire
String Polymorphic, optional field. If present and value is 'all', then all service components will be autowired. Otherwise, if present and value is list of one or more of tiles, apps, services, and storages, the specified components are autowired.
- Source:
Returns:
Promise
- Type
- Promise
-
<static> extensions() → {module:extensions}
-
API for managing add-on extensions.
- Source:
Returns:
- Type
- module:extensions
-
<static> init(expressApp, options)
-
Initializes the service based on the passed-in express app, and any configuration options. If an express app isn't provided, one is created.
- Applies globally applicable middleware to the express app
- Configures service role based on options
- Sets up service logging based on options
- Sets up service persistence based on options
- Sets up service scheduler based on options
Environment variable overrides:
- jive_sdk_service_role: optional, one of http, worker, pusher.
- jive_sdk_config_file: optional, if set, JSON options will be loaded from this path.
Parameters:
Name Type Description expressApp
options
Object JSON, or path to the options file.
- Source:
-
<static> isDevelopment() → {boolean}
-
- Source:
Returns:
Returns true if service configuration options has 'development' : true set.
- Type
- boolean
-
<static> persistence(persistenceStrategy) → {Object}
-
Retrieves or sets current persistence strategy, defaults to file.
Parameters:
Name Type Description persistenceStrategy
Object If set, the service will be configured to use the provided strategy.
Properties
Name Type Description find
function findByID
function remove
function save
function - Source:
Returns:
- Type
- Object
-
<static> scheduler(schedulerStrategy)
-
Retrieves or sets the scheduling strategy. Defaults to memory (single node). todo
Parameters:
Name Type Description schedulerStrategy
Object If set, the service will be configured to use the provided strategy.
Properties
Name Type Description schedule
function unschedule
function getTasks
function - Source:
-
<static> security() → {module:security}
-
API for managing service security
- Source:
Returns:
- Type
- module:security
-
<static> serviceStatus() → {string}
-
- Source:
Returns:
- Type
- string
-
<static> serviceURL()
-
Computes the full service URL for this service, taking into account jiveclientconfiguration.json (clientUrl & port)
- Source:
-
<static> start() → {Promise}
-
Return promise - fail or succeed
- Source:
Returns:
promise
- Type
- Promise
-
<static> stop() → {Promise}
-
Halt the service.
- Source:
Returns:
promise
- Type
- Promise