Skip to content

Commit

Permalink
feat: add how to modify config in README
Browse files Browse the repository at this point in the history
  • Loading branch information
travis_joe committed Dec 17, 2019
1 parent c9beb22 commit 546027b
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 2 deletions.
34 changes: 34 additions & 0 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,40 @@ English | [简体中文](./README-CN.md)
yarn install
```

* 修改配置, 在"src/utils/config.ts"

```
const api: API = {
serverList: [
{
name: 'Re-Birth Server',
url: 'https://rebirth.citahub.com'
},
{
name: 'CITA Node Server',
url: 'https://node.citahub.com'
}
],
jsonRpc: '/',
url: '/api/info/url',
status: '/api/status',
statistics: '/api/statistics',
blockList: '/api/blocks',
blockListV2: '/api/v2/blocks',
transactionList: '/api/transactions',
ercTransactionList: '/api/erc20/transfers'
}
const config: Config = {
api: api,
apiTimeout: 15000,
apiTimeoutMsg: 'api timeout,try it later',
apiErrorMsg: 'network error!',
icpRecordName: '',
icpRecordUrl: ''
}
```

* 调试环境

```
Expand Down
38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ English | [简体中文](./README-CN.md)


# Run

* Prerequisite

node ^8.10.0 || ^10.13.0 || >=11.10.1
Expand All @@ -68,6 +68,40 @@ English | [简体中文](./README-CN.md)
yarn install
```

* modify config in "src/utils/config.ts"

```
const api: API = {
serverList: [
{
name: 'Re-Birth Server',
url: 'https://rebirth.citahub.com'
},
{
name: 'CITA Node Server',
url: 'https://node.citahub.com'
}
],
jsonRpc: '/',
url: '/api/info/url',
status: '/api/status',
statistics: '/api/statistics',
blockList: '/api/blocks',
blockListV2: '/api/v2/blocks',
transactionList: '/api/transactions',
ercTransactionList: '/api/erc20/transfers'
}
const config: Config = {
api: api,
apiTimeout: 15000,
apiTimeoutMsg: 'api timeout,try it later',
apiErrorMsg: 'network error!',
icpRecordName: '',
icpRecordUrl: ''
}
```
* Develop Environment
```
Expand Down Expand Up @@ -122,7 +156,7 @@ English | [简体中文](./README-CN.md)
* /src/layouts/search/ -------- Search Failed Page
* /src/layouts/common --------- Transaction Table、Transaction Search Modal、Block Search Modal
* /src/components/ ------------ Basic Components,header/content/footer/loading/tab/toast/modal
* /src/components/redux ------- redux reduce/action/state
Expand Down

0 comments on commit 546027b

Please sign in to comment.