Skip to content

Commit

Permalink
fix: specify 8080, in line with our docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
HashMapsData2Value committed Oct 24, 2024
1 parent 9f6af19 commit 8a0f600
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

---

Terminal UI for managing Algorand nodes.
Built with [bubbles](https://github.com/charmbracelet/bubbles)/[bubbletea](https://github.com/charmbracelet/bubbletea)
Terminal UI for managing Algorand nodes.
Built with [bubbles](https://github.com/charmbracelet/bubbles)/[bubbletea](https://github.com/charmbracelet/bubbletea)

# 🚀 Get Started

Expand Down Expand Up @@ -52,7 +52,7 @@ Start a participation node
docker compose up
```

Connect to the node
Connect to the node

```bash
./bin/algorun --server http://localhost:8080 --token aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Expand All @@ -69,7 +69,7 @@ Configuration is loaded in the following order:
2. Home Directory
3. /etc/algorun/
2. ENV Configuration
- ALGORUN_*
- ALGORUN\_\*
3. CLI Flag Arguments
4. ALGORAND_DATA parsing

Expand All @@ -80,24 +80,23 @@ This results in `ALGORAND_DATA` taking precedence in the loading order.
Example configuration file:

```yaml
server: "http://localhost:4001"
server: "http://localhost:8080"
token: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
```
### Environment Variables
| Name | Example |
|----------------|----------------------------------------------------------------------------------|
| ALGORUN_SERVER | ALGORUN_SERVER="http://localhost:4001" |
| -------------- | -------------------------------------------------------------------------------- |
| ALGORUN_SERVER | ALGORUN_SERVER="http://localhost:8080" |
| ALGORUN_TOKEN | ALGORUN_TOKEN="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" |
### Flags
The application supports the `server` and `token` flags for configuration.

```bash
algorun --server http://localhost:4001 --token aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
algorun --server http://localhost:8080 --token aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

## 🧑‍💻 Commands
Expand All @@ -122,4 +121,4 @@ Display the usage information for the command

```bash
algorun help
```
```
11 changes: 6 additions & 5 deletions internal/participation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package internal
import (
"context"
"fmt"
"testing"

"github.com/algorandfoundation/hack-tui/api"
"github.com/oapi-codegen/oapi-codegen/v2/pkg/securityprovider"
"testing"
)

func Test_ListParticipationKeys(t *testing.T) {
Expand All @@ -27,7 +28,7 @@ func Test_ListParticipationKeys(t *testing.T) {
if err != nil {
t.Fatal(err)
}
client, err = api.NewClientWithResponses("http://localhost:4001", api.WithRequestEditorFn(apiToken.Intercept))
client, err = api.NewClientWithResponses("http://localhost:8080", api.WithRequestEditorFn(apiToken.Intercept))
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -59,7 +60,7 @@ func Test_ReadParticipationKey(t *testing.T) {
if err != nil {
t.Fatal(err)
}
client, err = api.NewClientWithResponses("http://localhost:4001", api.WithRequestEditorFn(apiToken.Intercept))
client, err = api.NewClientWithResponses("http://localhost:8080", api.WithRequestEditorFn(apiToken.Intercept))
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -100,7 +101,7 @@ func Test_GenerateParticipationKey(t *testing.T) {
if err != nil {
t.Fatal(err)
}
client, err = api.NewClientWithResponses("http://localhost:4001", api.WithRequestEditorFn(apiToken.Intercept))
client, err = api.NewClientWithResponses("http://localhost:8080", api.WithRequestEditorFn(apiToken.Intercept))
if err != nil {
t.Fatal(err)
}
Expand All @@ -126,7 +127,7 @@ func Test_DeleteParticipationKey(t *testing.T) {
if err != nil {
t.Fatal(err)
}
client, err := api.NewClientWithResponses("http://localhost:4001", api.WithRequestEditorFn(apiToken.Intercept))
client, err := api.NewClientWithResponses("http://localhost:8080", api.WithRequestEditorFn(apiToken.Intercept))
if err != nil {
t.Fatal(err)
}
Expand Down
7 changes: 4 additions & 3 deletions ui/viewport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ package ui

import (
"bytes"
"testing"
"time"

"github.com/algorandfoundation/hack-tui/api"
"github.com/algorandfoundation/hack-tui/internal"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/x/exp/teatest"
"github.com/oapi-codegen/oapi-codegen/v2/pkg/securityprovider"
"testing"
"time"
)

func Test_ViewportViewRender(t *testing.T) {
apiToken, err := securityprovider.NewSecurityProviderApiKey("header", "X-Algo-API-Token", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
client, err := api.NewClientWithResponses("http://localhost:4001", api.WithRequestEditorFn(apiToken.Intercept))
client, err := api.NewClientWithResponses("http://localhost:8080", api.WithRequestEditorFn(apiToken.Intercept))
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 8a0f600

Please sign in to comment.