studiokaiji d1eeff9130 Update dependencies in go.sum to latest versions
- Upgraded `github.com/bytedance/sonic` to v1.14.0
- Upgraded `github.com/cespare/xxhash/v2` to v2.2.0
- Upgraded `github.com/cloudwego/base64x` to v0.1.6
- Upgraded `github.com/gabriel-vasile/mimetype` to v1.4.8
- Upgraded `github.com/gin-contrib/sse` to v1.1.0
- Upgraded `github.com/gin-gonic/gin` to v1.11.0
- Upgraded `github.com/go-playground/validator/v10` to v10.27.0
- Upgraded `github.com/google/go-cmp` to v0.7.0
- Upgraded `github.com/klauspost/cpuid/v2` to v2.3.0
- Upgraded `github.com/leodido/go-urn` to v1.4.0
- Upgraded `github.com/mattn/go-isatty` to v0.0.20
- Upgraded `github.com/ugorji/go/codec` to v1.3.0
- Upgraded `golang.org/x/arch` to v0.20.0
- Upgraded `golang.org/x/crypto` to v0.40.0
- Upgraded `golang.org/x/net` to v0.42.0
- Upgraded `golang.org/x/sys` to v0.35.0
- Upgraded `golang.org/x/term` to v0.33.0
- Upgraded `golang.org/x/text` to v0.27.0
- Upgraded `golang.org/x/tools` to v0.34.0
- Upgraded `google.golang.org/protobuf` to v1.36.9
- Upgraded `gopkg.in/yaml.v3` to v3.0.1
2025-11-25 01:12:02 +09:00
2023-10-26 21:49:26 +09:00
2023-11-09 06:25:57 +09:00
2023-08-21 10:25:27 +09:00
2023-08-21 10:25:27 +09:00
2023-08-21 10:25:27 +09:00
2023-11-11 03:18:05 +09:00

Nostr Webhost (hostr)

Example webpage: https://h.hostr.cc/p/2d417bce8c10883803bc427703e3c4c024465c88e7063ed68f9dfeecf56911ac/d/hostr-lp

🌐 Overview

Nostr Webhost (hostr) is a command-line tool designed for hosting Single Page Applications (SPAs) using the Nostr protocol and its distributed network of relay servers. This tool provides a seamless way to deploy and access your SPA on the Nostr network.

⚠️ Caution

Domain-based authorization mechanisms such as NIP-7 should not currently be used. This is because the event is identified based on the path, so it will authorize other events as well.

📦 Installation

To get started with hostr, follow these steps:

  1. go install github.com/studiokaiji/nostr-webhost/hostr@latest

⌨️ Commands

COMMANDS:
   deploy        🌐 Deploy nostr website
   add-relay     📌 Add nostr relay
   remove-relay  🗑 Remove nostr relay
   list-relay    📝 List added nostr relays
   set-private   🔐 Set private key
   show-public   📛 Show public key
   generate-key  🗝 Generate key
   start         🕺 Wake up web server
   help, h       Shows a list of commands or help for one command

🚀 Getting Started

  1. Install Nostr Webhost as mentioned above.
  2. Set or generate private 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 hostr add-relay wss://r.hostr.cc
  4. Deploy hostr deploy --path /BUILT/SPA/DIR/PATH --identifier=test
    • The --identifier option is the identifier (d-tag) for Replaceable Events based on NIP-33. When you update this site, please specify the same identifier. If you want to create a non-replaceable site, you can achieve that by specifying --replaceable=false.
    • The event id of index.html will be output after deploy. Please make a copy of it.
  5. Start test web server hostr start
  6. Access the http://localhost:3000/d/{pubkey_or_npub}e/{nevent-of-index.html}

For detailed information on how to use each command, you can use the help command followed by the specific command name.

👍 Feedback and Contributions

If you encounter any issues or have suggestions for improvement, feel free to contribute to the project on GitHub.

📃 License

This project is licensed under the MIT. See the LICENSE file for more details.

Description
No description provided
Readme MIT 9.4 MiB
Languages
Go 88.2%
TypeScript 6.4%
Dockerfile 2.4%
JavaScript 1.3%
HTML 0.9%
Other 0.8%