Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grid client: Fix relay hostname in module docs #174

Merged
merged 5 commits into from
Apr 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/grid_client/docs/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Module should be:
### Twins

**Note:** Each network has its own relay. So, the relay would be
"wss://relay.${network}.grid.tf" in all networks except for main. It would be "wss://relay.grid.tf".
"relay.${network}.grid.tf" in all networks except for main. It would be "relay.grid.tf".

- **Create**

Expand Down Expand Up @@ -1051,7 +1051,7 @@ single master and multiple workers.
It will create a new account on tfchain.

**Note:** Each network has its own relay. So, the relay would be
"wss://relay.${network}.grid.tf" in all networks except for main. It would be "wss://relay.grid.tf".
"relay.${network}.grid.tf" in all networks except for main. It would be "relay.grid.tf".

cmd: `twinserver.tfchain.create`

Expand Down
6 changes: 6 additions & 0 deletions packages/grid_http_server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ You can also use another configuration file by using `--config` or `-c` option.

## Usage

All APIs supported can be executed by sending a post request to the server. To execute a method on a module, the module name followed by the method name should be sent on the request endpoint to be like `http://localhost:3000/{module}/{method}` and the arguments should be sent in request's body.

There is a ping endpoint as well to make sure that the server is up and running `http://localhost:3000/ping`

### Example

This is an example of getting a twin.
Put the following content in a file `test_twin.ts`

Expand Down
4 changes: 2 additions & 2 deletions packages/grid_http_server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class HttpServer {

run() {
// ping-pong the server
this.server.use("/ping", (req, res, next) => res.status(404).json("pong"));
this.server.use("/ping", (req, res, next) => res.status(200).json("pong"));

/** Error handling */
this.server.use((req, res, next) => {
Expand All @@ -97,7 +97,7 @@ class HttpServer {
}
}

if (!(config.network && config.mnemonic && config.storeSecret)) {
if (!(config.network && config.mnemonic)) {
throw new Error(`Invalid config. Please fill the config.json file with the correct data`);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/grid_rmb_server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Server {
}
}

if (!(config.network && config.mnemonic && config.storeSecret)) {
if (!(config.network && config.mnemonic)) {
throw new Error(`Invalid config. Please fill the config.json file with the correct data`);
}

Expand Down