Name: macaca-datahub
Owner: Macaca
Description: Continuous data provider for development, testing, staging and production.
Created: 2017-11-23 14:28:42.0
Updated: 2018-05-24 08:03:39.0
Pushed: 2018-05-23 04:18:46.0
Homepage: https://macacajs.github.io/zh/datahub
Size: 157
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Continuous data provider for development, testing, staging and production.
DataHub is born to solving the lifecycle needs of mock/testing data of software development, from development, testing, staging to final production. Software engineers and test engineers use DataHub to manage their mock/testing data.
DataHub is flexible with how and where mock/testing data is stored.
You can use a local instance of Datahub on your local machine to manage your local testing/mock data during development. The mock/testing data is in plain text. It can be versioned and archived with any version control software, together with your project files.
In addition, the local mock/testing data can be pushed and synchronized to a remote Datahub server to meet the needs of data sharing and collaboration.
DataHub adopts the principle of unidirectional data flow to make sure you will always get the latest data.
Datahub can also automatically generate an API document from your mock/testing data, to help keep your API document up to date and consistent with your mock data.
DataHub adopts multi-scenario design, can group data according to the scene name, and provide scene data addition, deletion, and change, and can operate through DataHub's panel interface
DataHub provides a dashboard for you to manage your data. You can group data by scene, or by stage such as development, testing, or staging. Datahub provides standard CRUD funtions.
DataHub can save the response of each request by taking snapshot. You can use the archieved snapshot to find out what happened.
Macaca datahub is distibuted through npm. To install it, run the following command line:
m i macaca-datahub -g
Start datahub server
tahub server
cker run -it -p 9200:9200 -p 9300:9300 macacajs/macaca-datahub
| 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
le.exports = {
de: 'local',
rt: 7001,
ore: path.resolve(__dirname, 'data'),
ew: {
// set assets base url
assetsUrl: 'https://npmcdn.com/datahub-view@latest',
Pass config file[.js
|.json
] to DataHub server.
tahub server -c path/to/config.js --verbose
DataHub use standard JSON schema syntax, schema must has the root
node.
ype": "object",
equired": [
"success"
roperties": {
"success": {
"type": "boolean"
},
"foo": {
"type": "object",
"description": "foo description",
"default": "",
"required": [
"bar"
],
"properties": {
"bar": {
"type": "string",
"description": "bar description"
}
}
}
live demo: webpack-datahub-sample
More about datahub-proxy-middleware
More about egg-datahub
UmiJS is a blazing-fast next.js-like framework for React apps, and it's friendly to ant-design project.
Build base mirror.
cker build -t="macacajs/macaca-datahub" .
Run as standalone just once service.
er run -it -p 9200:9200 -p 9300:9300 macacajs/macaca-datahub
Run with existed DataHub's database in your host.
cker run -it -v ~/.macaca-datahub/macaca-datahub.data:/root/.macaca-datahub/macaca-datahub.data -p 9200:9200 -p 9300:9300 macacajs/macaca-datahub
DataHub provides SDKs in multiple languages for easy integration with your test code.
|
xudafeng
|
zhangyuheng
|
zivyll
|
brucejcw
|
BernardTolosajr
|
Chan-Chun
| :—: | :—: | :—: | :—: | :—: | :—: |
|
atian25
This project follows the git-contributor spec, auto upated at Thu May 03 2018 22:46:55 GMT+0800
.
The MIT License (MIT)