diff --git a/nostrh/.gitignore b/hostr/.gitignore similarity index 100% rename from nostrh/.gitignore rename to hostr/.gitignore diff --git a/nostrh/.goreleaser.yaml b/hostr/.goreleaser.yaml similarity index 100% rename from nostrh/.goreleaser.yaml rename to hostr/.goreleaser.yaml diff --git a/nostrh/cmd/consts/consts.go b/hostr/cmd/consts/consts.go similarity index 100% rename from nostrh/cmd/consts/consts.go rename to hostr/cmd/consts/consts.go diff --git a/nostrh/cmd/deploy/deploy.go b/hostr/cmd/deploy/deploy.go similarity index 96% rename from nostrh/cmd/deploy/deploy.go rename to hostr/cmd/deploy/deploy.go index 39dbbcc..762070f 100644 --- a/nostrh/cmd/deploy/deploy.go +++ b/hostr/cmd/deploy/deploy.go @@ -12,10 +12,10 @@ import ( "sync" "github.com/nbd-wtf/go-nostr" - "github.com/studiokaiji/nostr-webhost/nostrh/cmd/consts" - "github.com/studiokaiji/nostr-webhost/nostrh/cmd/keystore" - "github.com/studiokaiji/nostr-webhost/nostrh/cmd/relays" - "github.com/studiokaiji/nostr-webhost/nostrh/cmd/tools" + "github.com/studiokaiji/nostr-webhost/hostr/cmd/consts" + "github.com/studiokaiji/nostr-webhost/hostr/cmd/keystore" + "github.com/studiokaiji/nostr-webhost/hostr/cmd/relays" + "github.com/studiokaiji/nostr-webhost/hostr/cmd/tools" "golang.org/x/net/html" ) diff --git a/nostrh/cmd/keystore/keystore.go b/hostr/cmd/keystore/keystore.go similarity index 95% rename from nostrh/cmd/keystore/keystore.go rename to hostr/cmd/keystore/keystore.go index 873012a..680d9e6 100644 --- a/nostrh/cmd/keystore/keystore.go +++ b/hostr/cmd/keystore/keystore.go @@ -8,7 +8,7 @@ import ( "github.com/nbd-wtf/go-nostr" "github.com/nbd-wtf/go-nostr/nip19" - "github.com/studiokaiji/nostr-webhost/nostrh/cmd/paths" + "github.com/studiokaiji/nostr-webhost/hostr/cmd/paths" ) const PATH = ".nostr_account_secret" diff --git a/nostrh/cmd/paths/paths.go b/hostr/cmd/paths/paths.go similarity index 100% rename from nostrh/cmd/paths/paths.go rename to hostr/cmd/paths/paths.go diff --git a/nostrh/cmd/relays/relays.go b/hostr/cmd/relays/relays.go similarity index 96% rename from nostrh/cmd/relays/relays.go rename to hostr/cmd/relays/relays.go index 9f3e24b..5c60b56 100644 --- a/nostrh/cmd/relays/relays.go +++ b/hostr/cmd/relays/relays.go @@ -5,7 +5,7 @@ import ( "path/filepath" "strings" - "github.com/studiokaiji/nostr-webhost/nostrh/cmd/paths" + "github.com/studiokaiji/nostr-webhost/hostr/cmd/paths" ) const PATH = ".nostr_relays" diff --git a/nostrh/cmd/server/server.go b/hostr/cmd/server/server.go similarity index 96% rename from nostrh/cmd/server/server.go rename to hostr/cmd/server/server.go index 8d40ff3..5930087 100644 --- a/nostrh/cmd/server/server.go +++ b/hostr/cmd/server/server.go @@ -8,8 +8,8 @@ import ( "github.com/gin-gonic/gin" "github.com/nbd-wtf/go-nostr" "github.com/nbd-wtf/go-nostr/nip19" - "github.com/studiokaiji/nostr-webhost/nostrh/cmd/consts" - "github.com/studiokaiji/nostr-webhost/nostrh/cmd/relays" + "github.com/studiokaiji/nostr-webhost/hostr/cmd/consts" + "github.com/studiokaiji/nostr-webhost/hostr/cmd/relays" ) func Start(port string) { diff --git a/nostrh/cmd/tools/displayPercent.go b/hostr/cmd/tools/displayPercent.go similarity index 100% rename from nostrh/cmd/tools/displayPercent.go rename to hostr/cmd/tools/displayPercent.go diff --git a/nostrh/cute-ostrich.txt b/hostr/cute-ostrich.txt similarity index 100% rename from nostrh/cute-ostrich.txt rename to hostr/cute-ostrich.txt diff --git a/nostrh/go.mod b/hostr/go.mod similarity index 98% rename from nostrh/go.mod rename to hostr/go.mod index 94afde2..8258e25 100644 --- a/nostrh/go.mod +++ b/hostr/go.mod @@ -1,4 +1,4 @@ -module github.com/studiokaiji/nostr-webhost/nostrh +module github.com/studiokaiji/nostr-webhost/hostr go 1.21 diff --git a/nostrh/go.sum b/hostr/go.sum similarity index 100% rename from nostrh/go.sum rename to hostr/go.sum diff --git a/nostrh/main.go b/hostr/main.go similarity index 93% rename from nostrh/main.go rename to hostr/main.go index 6fc2f8a..d9b13fd 100644 --- a/nostrh/main.go +++ b/hostr/main.go @@ -6,10 +6,10 @@ import ( "os" "github.com/nbd-wtf/go-nostr" - "github.com/studiokaiji/nostr-webhost/nostrh/cmd/deploy" - "github.com/studiokaiji/nostr-webhost/nostrh/cmd/keystore" - "github.com/studiokaiji/nostr-webhost/nostrh/cmd/relays" - "github.com/studiokaiji/nostr-webhost/nostrh/cmd/server" + "github.com/studiokaiji/nostr-webhost/hostr/cmd/deploy" + "github.com/studiokaiji/nostr-webhost/hostr/cmd/keystore" + "github.com/studiokaiji/nostr-webhost/hostr/cmd/relays" + "github.com/studiokaiji/nostr-webhost/hostr/cmd/server" "github.com/urfave/cli/v2" ) @@ -127,7 +127,7 @@ func main() { key := nostr.GeneratePrivateKey() err := keystore.SetSecret(key) if err == nil { - fmt.Print("šŸ— Generated key\nšŸ— You can check the public key with 'nostrh show-public'\n") + fmt.Print("šŸ— Generated key\nšŸ— You can check the public key with 'hostr show-public'\n") } return err }, diff --git a/readme.md b/readme.md index a5ff525..dbf5b46 100644 --- a/readme.md +++ b/readme.md @@ -13,7 +13,7 @@ Domain-based authorization mechanisms such as NIP-7 should not currently be used To get started with Nostr Webhost, follow these steps: -1. `go install github.com/studiokaiji/nostr-webhost/nostrh@latest` +1. `go install github.com/studiokaiji/nostr-webhost/hostr@latest` ### āŒØļø Commands @@ -34,15 +34,15 @@ COMMANDS: 1. Install Nostr Webhost as mentioned above. 2. Set or generate private key -If you set private key: `nostrh set-private "nsec or hex private key"` -Or if you want to generate private key: `nostrh generate-key` +If you set private key: `hostr set-private "nsec or hex private key"` +Or if you want to generate private key: `hostr generate-key` 3. Add relay -`nostrh add-relay wss://r.hostr.cc` +`hostr add-relay wss://r.hostr.cc` 4. Deploy -`nostrh deploy /BUILT/SPA/DIR/PATH` +`hostr deploy /BUILT/SPA/DIR/PATH` The event id of index.html will be output after deploy. Please make a copy of it. 5. Start test web server -`nostrh start` +`hostr start` 6. Access the `http://localhost:3000/e/{event-id-of-index.html}` For detailed information on how to use each command, you can use the `help` command followed by the specific command name.