loopback/node_modules/data-source/README.md

11 lines
612 B
Markdown
Raw Normal View History

2013-04-18 00:43:00 +00:00
# data-source
## About
2013-04-26 17:10:10 +00:00
A `DataSource` is the base `AsteroidModule` class for all data sources. Data sources provide APIs for reading and writing remote data from databases and various http apis.
2013-04-26 17:10:10 +00:00
### Creating a custom Data Source
2013-04-26 17:10:10 +00:00
To create a custom data source you must define a class that inherits from `DataSource`. This class should define all the required options using the [asteroid module option api](../asteroid-module) (eg. host, port, username, etc).
The inherited class must provide a property `adapter` that points to a [jugglingdb adapter](https://github.com/1602/jugglingdb#jugglingdb-adapters).