티스토리 뷰

반응형

Blockchain-explorer 실행 PORT 변경


blockchain-explorer는 기본적으로 8080 포트로 실행되는데, 이 포트를 변경하는 방법에 대해 알아보겠습니다.

※ blockchain-explorer v0.3.5를 기반으로 작성되었습니다.


appconfig.json

blockchain-explorer/ 디렉토리 내에 있는 appconfig.json 파일에서 port 항목을 수정합니다.

8080에서 8001로 수정해보겠습니다.

{
  "host": "localhost",
  "port": "8001",
  "license": "Apache-2.0"
}

6000 등과 같은 port 번호로는 실행되지 않으니 유의하시기 바랍니다.


swagger.json

blockchain-explorer/ 디렉토리 내에 있는 swagger.json 파일에서 host 항목을 수정합니다.

{
  "swagger": "2.0",
  "info": {
    "title": "Hyperledger Explorer REST API Swagger",
    "description": "Rest API for fabric .",
    "version": "1.0.0",
    "contact": {
      "name": "Hyperledger Team"
    }
  },
  "host": "localhost:8001",
  "schemes": ["http"],
  "basePath": "/api",
  "produces": ["application/json"],
  "tags": [
    {
      "name": "Channel",
      "description": "Everything about your channel"
    },
    {
      "name": "Chaincodes",
      "description": "Everything about your chaincodes"
    },
    {
      "name": "Blocks",
      "description": "Everything about your blocks"
    },
    {
      "name": "Transactions",
      "description": "Everything about your transactions"
    }
  ],
  "paths": {
    "/channels": {
      "get": {
        "tags": ["Channel"],
        "summary": "Query to fetch channels",
        "description": "Query to fetch channels",
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Channels"
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/status/{channel_genesis_hash}": {
      "get": {
        "tags": ["Channel"],
        "summary": "Query to get BlockCount on a channel",
        "description": "Query to get BlockCount on a channel",
        "parameters": [
          {
            "name": "channel_genesis_hash",
            "in": "path",
            "description": "channel_genesis_hash",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object",
              "properties": {
                "chaincodeCount": {
                  "type": "string"
                },
                "txCount": {
                  "type": "string"
                },
                "peerCount": {
                  "type": "string"
                },
                "latestBLock": {
                  "type": "number"
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/curChannel": {
      "get": {
        "tags": ["Channel"],
        "summary": "get Current channel",
        "description": "get Current channel",
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/curChannel"
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/changeChannel/{channel_genesis_hash}": {
      "get": {
        "tags": ["Channel"],
        "summary": "Query to get Change Channel on a channel",
        "description": "Query to get Change Channel on a channel",
        "parameters": [
          {
            "name": "channel_genesis_hash",
            "in": "path",
            "description": "channel_genesis_hash",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object",
              "properties": {
                "currentChannel": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/chaincode/{channel_genesis_hash}": {
      "get": {
        "tags": ["Chaincodes"],
        "summary": "Query to fetch all Installed/instantiated chaincodes",
        "description": "Query to fetch all Installed/instantiated chaincodes",
        "parameters": [
          {
            "name": "channel_genesis_hash",
            "in": "path",
            "description": "channel_genesis_hash",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "version": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string"
                  },
                  "channel_genesis_hash": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/channel": {
      "post": {
        "tags": ["Channel"],
        "summary": "Create New channel on target peers  ",
        "description": "Create New channel on target peers",
        "consumes": ["application/x-www-form-urlencoded"],
        "produces": ["application/json"],
        "parameters": [
          {
            "name": "channelName",
            "in": "formData",
            "description": "channel name",
            "required": true,
            "type": "string"
          },
          {
            "name": "genesisBlock",
            "in": "formData",
            "description": "gensis block",
            "required": true,
            "type": "string"
          },
          {
            "name": "orgName",
            "in": "formData",
            "description": "organation name ",
            "required": true,
            "type": "string"
          },
          {
            "name": "channelArtificats",
            "in": "formData",
            "description": "channelArtificats",
            "required": true,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          {
            "name": "profile",
            "in": "formData",
            "description": "block profile",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/joinChannel": {
      "post": {
        "tags": ["Channel"],
        "summary": "join channel ",
        "description": "join  channel ",
        "consumes": ["application/json", "application/x-www-form-urlencoded"],
        "produces": ["application/json"],
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "description": "payload",
            "schema": {
              "type": "object",
              "properties": {
                "channelName": {
                  "type": "string"
                },
                "orgName": {
                  "type": "string"
                },
                "peers": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object",
              "properties": {
                "success": {
                  "type": "boolean"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/block/{channel_genesis_hash}/{number}": {
      "get": {
        "tags": ["Blocks"],
        "summary": "Query to Fetch Blocks",
        "description": "Query to Fetch Blocks",
        "parameters": [
          {
            "name": "channel_genesis_hash",
            "in": "path",
            "description": "channel_genesis_hash",
            "required": true,
            "type": "string"
          },
          {
            "name": "number",
            "in": "path",
            "description": "block number",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "number"
                },
                "number": {
                  "type": "string"
                },
                "previous_hash": {
                  "type": "string"
                },
                "channel_genesis_hash": {
                  "type": "string"
                },
                "data_hash": {
                  "type": "string"
                },
                "transactions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "signature": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string"
                          },
                          "data": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          }
                        }
                      },
                      "payload": {
                        "$ref": "#/definitions/blockPayload"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/block/transactions/{channel_genesis_hash}/{number}": {
      "get": {
        "tags": ["Transactions"],
        "summary": "Query to Fetch Block Transactions",
        "description": "Query to Fetch Block Transactions",
        "parameters": [
          {
            "name": "channel_genesis_hash",
            "in": "path",
            "description": "channel_genesis_hash",
            "required": true,
            "type": "string"
          },
          {
            "name": "number",
            "in": "path",
            "description": "block number",
            "required": true,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "number"
                },
                "number": {
                  "type": "number"
                },
                "txCount": {
                  "type": "number"
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/blockActivity/{channel_genesis_hash}": {
      "get": {
        "tags": ["Blocks"],
        "summary": "Query to Fetch Block Activity List",
        "description": "Query to Fetch Block Acivity List",
        "parameters": [
          {
            "name": "channel_genesis_hash",
            "in": "path",
            "description": "channel_genesis_hash",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "number"
                },
                "txcount": {
                  "type": "number"
                },
                "datahash": {
                  "type": "string"
                },
                "blockhash": {
                  "type": "string"
                },
                "prehash": {
                  "type": "string"
                },
                "createdt": {
                  "type": "string"
                },
                "txhash": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/transaction/{channel_genesis_hash}/{txid}": {
      "get": {
        "tags": ["Transactions"],
        "summary": "Query to Get Transaction by Txid",
        "description": "Query to Get Transaction by Txid",
        "parameters": [
          {
            "name": "channel_genesis_hash",
            "in": "path",
            "description": "channel_genesis_hash",
            "required": true,
            "type": "string"
          },
          {
            "name": "txid",
            "in": "path",
            "description": "transaction id",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "number"
                },
                "row": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "number"
                    },
                    "channel_genesis_hash": {
                      "type": "string"
                    },
                    "channelname": {
                      "type": "string"
                    },
                    "blockid": {
                      "type": "number"
                    },
                    "txhash": {
                      "type": "string"
                    },
                    "createdt": {
                      "type": "string"
                    },
                    "chaincodename": {
                      "type": "string"
                    },
                    "status": {
                      "type": "number"
                    },
                    "creator_msp_id": {
                      "type": "string"
                    },
                    "endorser_msp_id": {
                      "type": "string"
                    },
                    "chancode_id": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "read_set": {
                      "type": "array",
                      "items": {
                        "$ref": "#/definitions/Set"
                      }
                    },
                    "write_set": {
                      "type": "array",
                      "items": {
                        "$ref": "#/definitions/Set"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/txList/{channel_genesis_hash}/{number}/{txid}": {
      "get": {
        "tags": ["Transactions"],
        "summary": "Query to Get Trasaction List",
        "description": "Query to Get Trasaction List",
        "parameters": [
          {
            "name": "channel_genesis_hash",
            "in": "path",
            "description": "channel_gensis_hash",
            "required": true,
            "type": "string"
          },
          {
            "name": "number",
            "in": "path",
            "description": "block number",
            "required": true,
            "type": "number"
          },
          {
            "name": "txid",
            "in": "path",
            "description": "block number",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "number"
                },
                "rows": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number"
                      },
                      "channelname": {
                        "type": "string"
                      },
                      "channel_genesis_hash": {
                        "type": "string"
                      },
                      "blockid": {
                        "type": "number"
                      },
                      "txhash": {
                        "type": "string"
                      },
                      "createdt": {
                        "type": "string"
                      },
                      "chaincodename": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/peers/{channel_genesis_hash}": {
      "get": {
        "tags": ["Channel"],
        "summary": "Peers",
        "description": "Peers",
        "parameters": [
          {
            "name": "channel_genesis_hash",
            "in": "path",
            "description": "channel_genesis_hash",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "number"
                },
                "peers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "requests": {
                        "type": "string"
                      },
                      "channel_genesis_hash": {
                        "type": "string"
                      },
                      "server_hostname": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/peersStatus/{channelName}": {
      "get": {
        "tags": ["Channel"],
        "summary": "Query Get PeersStatus",
        "description": "Query Get PeersStatus",
        "parameters": [
          {
            "name": "channelName",
            "in": "path",
            "description": "channel name",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "number"
                },
                "peers": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "requests": {
                        "type": "string"
                      },
                      "server_hostname": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/blockAndTxList/{channel_genesis_hash}/{number}": {
      "get": {
        "tags": ["Transactions"],
        "summary": "Query to Get Block And Transaction List",
        "description": "Query to Get Block And Transaction List",
        "parameters": [
          {
            "name": "channel_genesis_hash",
            "in": "path",
            "description": "channel_genesis_hash",
            "required": true,
            "type": "string"
          },
          {
            "name": "number",
            "in": "path",
            "description": "block number",
            "required": true,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "number"
                },
                "rows": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "number"
                      },
                      "blocknum": {
                        "type": "number"
                      },
                      "channel_genesis_hash": {
                        "type": "string"
                      },
                      "data_hash": {
                        "type": "string"
                      },
                      "prehash": {
                        "type": "string"
                      },
                      "channelname": {
                        "type": "string"
                      },
                      "txCount": {
                        "type": "number"
                      },
                      "createdt": {
                        "type": "string"
                      },
                      "prev_blockhash": {
                        "type": "string"
                      },
                      "blockhash": {
                        "type": "string"
                      },
                      "txhash": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/txByMinute/{channel_genesis_hash}/{hours}": {
      "get": {
        "tags": ["Transactions"],
        "summary": "Query to Get Trasaction BY Minute",
        "description": "Query to Get Trasaction By Minute",
        "parameters": [
          {
            "name": "channel_genesis_hash",
            "in": "path",
            "description": "channel_genesis_hash",
            "required": true,
            "type": "string"
          },
          {
            "name": "hours",
            "in": "path",
            "description": "hours ",
            "required": true,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "number"
                },
                "rows": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/TxCount"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/txByHour/{channel_genesis_hash}/{days}": {
      "get": {
        "tags": ["Transactions"],
        "summary": "Query to Get Trasaction By Hour",
        "description": "Queryto  Get Trasaction BY Hour",
        "parameters": [
          {
            "name": "channel_genesis_hash",
            "in": "path",
            "description": "channel_genesis_hash",
            "required": true,
            "type": "string"
          },
          {
            "name": "days",
            "in": "path",
            "description": "days",
            "required": true,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "number"
                },
                "rows": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/TxCount"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/blocksByMinute/{channel_genesis_hash}/{hours}": {
      "get": {
        "tags": ["Blocks"],
        "summary": "Query to Get Blocks BY Minute",
        "description": "Query to Get Blocks By Minute",
        "parameters": [
          {
            "name": "channel_genesis_hash",
            "in": "path",
            "description": "channel_genesis_hash",
            "required": true,
            "type": "string"
          },
          {
            "name": "hours",
            "in": "path",
            "description": "hours ",
            "required": true,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "number"
                },
                "rows": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/TxCount"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/blocksByHour/{channel_genesis_hash}/{days}": {
      "get": {
        "tags": ["Blocks"],
        "summary": "Query to Get Blocks By Hour",
        "description": "Query to Get Blocks By Hour",
        "parameters": [
          {
            "name": "channel_genesis_hash",
            "in": "path",
            "description": "channel_genesis_hash",
            "required": true,
            "type": "string"
          },
          {
            "name": "days",
            "in": "path",
            "description": "days",
            "required": true,
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "number"
                },
                "rows": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/TxCount"
                  }
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/txByOrg/{channel_genesis_hash}": {
      "get": {
        "tags": ["Blocks"],
        "summary": "Query Get Trasaction By Org",
        "description": "Query Get Trasaction BY Org",
        "parameters": [
          {
            "name": "channel_genesis_hash",
            "in": "path",
            "description": "channel_genesis_hash",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "number"
                },
                "rows": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "count": {
                        "type": "string"
                      },
                      "creator_msp_id": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/channels/info": {
      "get": {
        "tags": ["Channels"],
        "summary": "Query to Get Channels Inforamtion",
        "description": "Query to Get channel Information",
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "number"
                },
                "channels": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "channelName": {
                        "type": "string"
                      },
                      "channel_genesis_hash": {
                        "type": "string"
                      },
                      "channel_hash": {
                        "type": "string"
                      },
                      "createdat": {
                        "type": "string"
                      },
                      "blocks": {
                        "type": "number"
                      },
                      "transactions": {
                        "type": "number"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "Channels": {
      "type": "object",
      "properties": {
        "status": {
          "default": 200,
          "type": "number"
        },
        "channels": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "channel_id": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "curChannel": {
      "type": "object",
      "properties": {
        "currentChannel": {
          "type": "string"
        }
      }
    },
    "blockPayload": {
      "type": "object",
      "properties": {
        "header": {
          "type": "object",
          "properties": {
            "channel_header": {
              "type": "object",
              "properties": {
                "version": {
                  "type": "number"
                },
                "type": {
                  "type": "number"
                },
                "time_stamp": {
                  "type": "string"
                },
                "channel_id": {
                  "type": "string"
                },
                "txid": {
                  "type": "string"
                },
                "epoch": {
                  "type": "string"
                }
              }
            },
            "signature_header": {
              "type": "object",
              "properties": {
                "creator": {
                  "type": "object",
                  "properties": {
                    "Mspid": {
                      "type": "string"
                    },
                    "Idbytes": {
                      "type": "string"
                    }
                  }
                },
                "nonce": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "number"
                      }
                    },
                    "type": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "data": {
              "type": "object"
            }
          }
        }
      }
    },
    "Set": {
      "type": "object",
      "properties": {
        "chaincode": {
          "type": "string"
        },
        "set": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string"
              },
              "version": {
                "type": "object",
                "properties": {
                  "block_num": {
                    "type": "number"
                  },
                  "tx_num": {
                    "type": "number"
                  }
                }
              }
            }
          }
        }
      }
    },
    "TxCount": {
      "type": "object",
      "properties": {
        "datetime": {
          "type": "string"
        },
        "count": {
          "type": "string"
        }
      }
    },
    "Error": {
      "type": "object",
      "properties": {
        "success": {
          "type": "boolean"
        },
        "message": {
          "type": "string"
        }
      }
    }
  }
}


client/package.json

blockchain-explorer/client 디렉토리 내에 있는 package.json 파일에서 proxy 항목을 수정합니다.

{
  "name": "hyperledger-explorer-client",
  "version": "0.3.7",
  "private": true,
  "license": "Apache-2.0",
  "dependencies": {
    "@khanacademy/react-multi-select": "^0.2.8",
    "@material-ui/core": "^1.4.1",
    "@material-ui/icons": "^2.0.0",
    "ajv": "^6.2.0",
    "aphrodite": "^1.2.5",
    "bootstrap": "^4.0.0",
    "chart.js": "^2.7.2",
    "classnames": "^2.2.6",
    "font-awesome": "^4.7.0",
    "immutable": "^3.8.1",
    "jquery": "^3.0.0",
    "js-beautify": "^1.7.5",
    "lodash": "^4.17.10",
    "match-sorter": "^2.2.1",
    "moment": "^2.22.2",
    "moment-timezone": "^0.5.16",
    "nock": "^9.3.3",
    "pg": "^7.4.1",
    "prop-types": "^15.6.2",
    "react": "^16.4.1",
    "react-copy-to-clipboard": "^5.0.1",
    "react-d3-graph": "^1.0.1",
    "react-datepicker": "^1.6.0",
    "react-dom": "^16.2.0",
    "react-event-timeline": "^1.5.4",
    "react-fontawesome": "^1.6.1",
    "react-js-pagination": "^3.0.1",
    "react-json-tree": "^0.11.0",
    "react-loader-spinner": "^2.1.0",
    "react-redux": "^4.4.8",
    "react-refetch": "^1.0.4",
    "react-router": "^4.2.0",
    "react-router-dom": "^4.2.2",
    "react-scripts": "^1.1.5",
    "react-select": "^1.2.1",
    "react-slick": "^0.18.1",
    "react-swipeable-views": "^0.12.12",
    "react-table": "^6.8.2",
    "react-timeago": "^4.1.9",
    "react-tree-graph": "^3.1.0",
    "react-websocket": "^2.0.0",
    "reactstrap": "^5.0.0",
    "recharts": "^1.0.0-beta.9",
    "recompose": "^0.27.1",
    "redux": "^3.7.2",
    "redux-actions": "^0.9.1",
    "redux-thunk": "^2.2.0",
    "slick-carousel": "^1.8.1",
    "superagent": "^3.8.2",
    "typeface-roboto": "0.0.50"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject",
    "lint": "eslint"
  },
  "proxy": "http://localhost:8001/",
  "devDependencies": {
    "babel-eslint": "^8.2.5",
    "enzyme": "^3.3.0",
    "enzyme-adapter-react-16": "^1.1.1",
    "eslint": "^4.19.1",
    "eslint-config-airbnb": "^17.0.0",
    "eslint-plugin-import": "^2.13.0",
    "eslint-plugin-jsx-a11y": "^6.1.0",
    "eslint-plugin-react": "^7.10.0",
    "jest-enzyme": "^4.2.0",
    "mock-local-storage": "^1.0.5",
    "react-addons-test-utils": "^15.6.2",
    "react-test-renderer": "^16.2.0",
    "redux-devtools": "^3.4.1",
    "redux-mock-store": "^1.5.1",
    "sinon": "^4.2.2"
  },
  "jest": {
    "collectCoverageFrom": [
      "src/**/*.{test,js,jsx}",
      "!src/**/*.{json}",
      "!src/config.js",
      "!src/index.js",
      "!src/setupTests.js",
      "!src/registerServiceWorker.js"
    ],
    "coverageReporters": [
      "json",
      "lcov",
      "text"
    ],
    "coverageThreshold": {
      "global": {
        "branches": 0,
        "functions": 0,
        "lines": 0,
        "statements": 0
      },
      "./src/components/": {
        "branches": 0,
        "statements": 0
      },
      "./src/store/reducers/**/*.js": {
        "statements": 0
      }
    },
    "snapshotSerializers": []
  }
}


blockchain-explorer 실행

이제 blockchain-explorer를 실행하면 다음과 같이 변경한 포트 번호로 로그가 출력됩니다.


localhost:8001 웹 페이지에 접속하면 다음과 같이 blockchain-explorer가 실행중인 것을 확인할 수 있습니다.



반응형
댓글
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/11   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
글 보관함