diff --git a/README.md b/README.md index 8b824f2..afcf2aa 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,14 @@ A Rust learning project with poor code quality. # Usage ## Running Locally Run `cargo run` with environment variable `DB_PATH` set to the path of the database file. -RUST_LOG=info BIND_ADDR="0.0.0.0:8080" DB_PATH=./nostr.db AUTH_REQUIRED=True cargo run +`RUST_LOG=info BIND_ADDR="0.0.0.0:8080" DB_PATH=./nostr.db AUTH_REQUIRED=True cargo run` ## Docker # Run with a persistent database volume -docker run -p 8080:8080 -v /path/to/your/db:/usr/local/bin/nostr.db laoxong/nostr_demo:master -docker run -p 8080:8080 -e AUTH_REQUIRED=true laoxong/nostr_demo:master +`docker run -p 8080:8080 -v /path/to/your/db:/usr/local/bin/nostr.db laoxong/nostr_demo:master` +`docker run -p 8080:8080 -e AUTH_REQUIRED=true laoxong/nostr_demo:master` + ## Docker Compose ``` @@ -26,13 +27,13 @@ nostr-relay: ``` # Env -DB_PATH: Path to the SQLite database file. Defaults to `nostr.db`. +- DB_PATH: Path to the SQLite database file. Defaults to `nostr.db`. -BIND_ADDR: The address and port to bind the server to. Defaults to `0.0.0.0:8080`. +- BIND_ADDR: The address and port to bind the server to. Defaults to `0.0.0.0:8080`. -RUST_LOG: Log level. Defaults to `warn` +- RUST_LOG: Log level. Defaults to `warn` -AUTH_REQUIRED: Set to `true` to enable authentication for publishing events (NIP-42). Defaults to `false`. If enabled, only authenticated clients whose pubkey is in the relay's trust list can publish events. +- AUTH_REQUIRED: Set to `true` to enable authentication for publishing events (NIP-42). Defaults to `false`. If enabled, only authenticated clients whose pubkey is in the relay's trust list can publish events. # Features - NIP-1