Skip to content

Commit

Permalink
nostrhコマンドをhostrに変更
Browse files Browse the repository at this point in the history
  • Loading branch information
studiokaiji committed Sep 27, 2023
1 parent acbb928 commit b21a838
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 20 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions nostrh/cmd/deploy/deploy.go → hostr/cmd/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion nostrh/cmd/relays/relays.go → hostr/cmd/relays/relays.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions nostrh/cmd/server/server.go → hostr/cmd/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion nostrh/go.mod → hostr/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/studiokaiji/nostr-webhost/nostrh
module github.com/studiokaiji/nostr-webhost/hostr

go 1.21

Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions nostrh/main.go → hostr/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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
},
Expand Down
12 changes: 6 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand Down

0 comments on commit b21a838

Please sign in to comment.