Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Danny-Ngg authored Mar 2, 2022
1 parent b165e2e commit 1573ef6
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,13 @@ Install dependencies:
```bash
yarn
```
Default running port is 8080. By changing "port", you may set the new running port
Update hostname and port pointing to flink back-end in file adapter/config.json:

```bash
{
"url" : "http://<host>:<port>/deal/"
"port": <port>
}

```
Expand All @@ -96,26 +99,22 @@ Run the local tests:
yarn test
```

Natively run the application (defaults to port 8080):

To change the default port
```bash
export EA_PORT=<port>
```

### Run

```bash
yarn start
```

## Call the external adapter/API server
Flink is supporting both GET and POST api calls

POST /deal
```bash
curl -X POST -H "content-type:application/json" "http://localhost:8080/" --data '{ "id": 0, "data": { "deal":"58160", "network":"filecoin_mainnet"} }'
curl -X POST -H "content-type:application/json" "http://localhost:<port>/deal" --data '{ "id": 0, "data": { "deal":"58160", "network":"filecoin_mainnet"} }'
```
GET /deal/{deal_id}?network=filecoin_mainnet
```bash
curl -X GET "http://localhost:8080?deal=58160&network=filecoin_mainnet"
curl -X GET "http://localhost:8080/deal/58160?network=filecoin_mainnet"
```

## Docker
Expand Down

0 comments on commit 1573ef6

Please sign in to comment.