Continuous data provider for development, testing, staging and production.
Macaca datahub is distibuted through npm. To install it, run the following command line:
$ npm i macaca-datahub -g
Start datahub server
$ datahub server
key | type | description | default |
---|---|---|---|
port | Number | port for DataHub server | 9200 |
mode | String | mode for DataHub server | 'prod' |
protocol | String | protocol for DataHub server | 'http' |
database | String | path to file database | $HOME |
store | String | path to migrate directory | undefined |
view | Object | view layer config | {} |
Sample: macaca-datahub.config.js
module.exports = {
mode: 'local',
port: 7001,
store: path.resolve(__dirname, 'data'),
view: {
// set assets base url
assetsUrl: 'https://npmcdn.com/datahub-view@latest',
},
};
Pass config file[.js
|.json
] to DataHub server.
$ datahub server -c path/to/config.js --verbose
More about datahub-proxy-middleware
Common usage
$ docker run -it -p 9200:9200 -p 9300:9300 macacajs/macaca-datahub
Build base mirror.
$ docker build -t="macacajs/macaca-datahub" .
Run as standalone just once service.
docker run -it -p 9200:9200 -p 9300:9300 macacajs/macaca-datahub
Run with existed datahub's database in your host.
$ docker run -it -v ~/.macaca-datahub/macaca-datahub.data:/root/.macaca-datahub/macaca-datahub.data -p 9200:9200 -p 9300:9300 macacajs/macaca-datahub
zhangyuheng |
xudafeng |
zivyll |
atian25 |
brucejcw |
BernardTolosajr |
---|
This project follows the git-contributor spec, auto upated at Thu Apr 12 2018 18:13:29 GMT+0800
.
The MIT License (MIT)