nostrhコマンドをhostrに変更

This commit is contained in:
studiokaiji
2023-09-28 00:44:09 +09:00
parent acbb9280c3
commit b21a838401
14 changed files with 20 additions and 20 deletions

View File

@@ -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"
)

View File

@@ -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"

View File

@@ -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"

View File

@@ -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) {

View File

@@ -1,4 +1,4 @@
module github.com/studiokaiji/nostr-webhost/nostrh
module github.com/studiokaiji/nostr-webhost/hostr
go 1.21

View File

@@ -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
},

View File

@@ -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.