mirror of
https://github.com/studiokaiji/nostr-webhost.git
synced 2025-12-17 06:44:28 +01:00
f7dd9e50cf80856ca8271245cd73ae3ab0b1cef9
Nostr Webhost
Overview
Nostr Webhost 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.
Installation
To get started with Nostr Webhost, follow these steps:
go install github.com/studiokaiji/nostr-webhost/nostrh@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
- Install Nostr Webhost as mentioned above.
- 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 - Add relay
nostrh add-relay wss://nostrwebhost.studiokaiji.com - Deploy
nostrh deploy /BUILT/SPA/DIR/PATHThe event id of index.html will be output after deploy. Please make a copy of it. - Start test web server
nostrh start - 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.
Feedback and Contributions
If you encounter any issues or have suggestions for improvement, feel free to contribute to the project on GitHub [link to GitHub repository].
License
This project is licensed under the MIT. See the LICENSE file for more details.
Languages
Go
88.2%
TypeScript
6.4%
Dockerfile
2.4%
JavaScript
1.3%
HTML
0.9%
Other
0.8%