From 51751d59f30a0c0f396afd1873ece9f4f77b44de Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Mon, 12 Jan 2026 22:51:43 +0000 Subject: Change default port from 8080 to 7334 (NGIT on phone keypad) - Update default bind address in src/config.rs to 127.0.0.1:7334 - Update all four critical config sources per AGENTS.md: - src/config.rs (code default and tests) - .env.example (development template) - docs/reference/configuration.md (user documentation) - nix/module.nix (NixOS deployment) - Update all documentation examples and references: - README.md (with note about phone keypad mnemonic) - docs/how-to/*.md (deploy, prometheus-setup, test-compliance) - docs/explanation/*.md (architecture, comparison) - docs/learnings/grasp-audit.md Port 7334 spells NGIT on a phone keypad, making it memorable and project-specific. All tests pass (336 lib tests + 51 integration tests). --- docs/explanation/architecture.md | 2 +- docs/explanation/comparison.md | 2 +- docs/how-to/deploy.md | 2 +- docs/how-to/prometheus-setup.md | 6 +++--- docs/how-to/test-compliance.md | 4 ++-- docs/learnings/grasp-audit.md | 2 +- docs/reference/configuration.md | 24 ++++++++++++------------ 7 files changed, 21 insertions(+), 21 deletions(-) (limited to 'docs') diff --git a/docs/explanation/architecture.md b/docs/explanation/architecture.md index d2a9bf7..e101425 100644 --- a/docs/explanation/architecture.md +++ b/docs/explanation/architecture.md @@ -580,7 +580,7 @@ RUN cargo build --release FROM debian:bookworm-slim RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* COPY --from=builder /app/target/release/ngit-grasp /usr/local/bin/ -EXPOSE 8080 +EXPOSE 7334 CMD ["ngit-grasp"] ``` diff --git a/docs/explanation/comparison.md b/docs/explanation/comparison.md index 72e49a7..090e0eb 100644 --- a/docs/explanation/comparison.md +++ b/docs/explanation/comparison.md @@ -65,7 +65,7 @@ This document compares ngit-grasp (this project) with ngit-relay (the reference ┌────────────── ngit-grasp (Single Binary) ─────────────┐ │ │ │ ┌──────────────────────────────────────────────────┐ │ -│ │ hyper HTTP Server (:8080) │ │ +│ │ hyper HTTP Server (:7334) │ │ │ │ - WebSocket upgrade for Nostr relay │ │ │ │ - Git Smart HTTP handlers │ │ │ │ - Landing page + metrics endpoint │ │ diff --git a/docs/how-to/deploy.md b/docs/how-to/deploy.md index 6fe8776..157e5f8 100644 --- a/docs/how-to/deploy.md +++ b/docs/how-to/deploy.md @@ -229,7 +229,7 @@ git ls-remote https://ngit.example.com//.git ### Network - `bindAddress` - IP to bind to (default: "127.0.0.1") -- `port` - Port to listen on (default: 8080) +- `port` - Port to listen on (default: 7334) ### Storage - `dataDir` - Base directory for data (default: /var/lib/ngit-grasp-{name}) diff --git a/docs/how-to/prometheus-setup.md b/docs/how-to/prometheus-setup.md index 741255b..53ec480 100644 --- a/docs/how-to/prometheus-setup.md +++ b/docs/how-to/prometheus-setup.md @@ -13,7 +13,7 @@ This guide shows how to configure Prometheus and Grafana to monitor ngit-grasp. First, verify that ngit-grasp is exposing metrics: ```bash -curl http://localhost:8080/metrics +curl http://localhost:7334/metrics ``` You should see Prometheus-formatted metrics like: @@ -41,7 +41,7 @@ services.prometheus = { { job_name = "ngit-grasp"; static_configs = [{ - targets = [ "localhost:8080" ]; # ngit-grasp bind address + targets = [ "localhost:7334" ]; # ngit-grasp bind address }]; scrape_interval = "15s"; metrics_path = "/metrics"; @@ -105,7 +105,7 @@ global: scrape_configs: - job_name: 'ngit-grasp' static_configs: - - targets: ['host.docker.internal:8080'] # or your ngit-grasp host + - targets: ['host.docker.internal:7334'] # or your ngit-grasp host metrics_path: /metrics ``` diff --git a/docs/how-to/test-compliance.md b/docs/how-to/test-compliance.md index 370fb9a..8aa7ab1 100644 --- a/docs/how-to/test-compliance.md +++ b/docs/how-to/test-compliance.md @@ -184,7 +184,7 @@ nix develop -c cargo run # In another terminal, run audit tool cd grasp-audit -nix develop -c cargo run -- --url ws://127.0.0.1:8080 +nix develop -c cargo run -- --url ws://127.0.0.1:7334 ``` ### For CI/CD @@ -424,7 +424,7 @@ nix develop -c cargo test --test nip01_compliance --test nip34_announcements **For deep compliance check:** ```bash cd grasp-audit -nix develop -c cargo run -- --url ws://127.0.0.1:8080 +nix develop -c cargo run -- --url ws://127.0.0.1:7334 ``` **Key points:** diff --git a/docs/learnings/grasp-audit.md b/docs/learnings/grasp-audit.md index f4620d9..c7eff16 100644 --- a/docs/learnings/grasp-audit.md +++ b/docs/learnings/grasp-audit.md @@ -110,7 +110,7 @@ use grasp_audit::client::AuditClient; use grasp_audit::audit::AuditConfig; let config = AuditConfig::isolated(); -let client = AuditClient::new("ws://localhost:8080", config).await?; +let client = AuditClient::new("ws://localhost:7334", config).await?; // Create and send an event - cleanup tags are added automatically let event = client.event_builder() diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md index 66f39f1..8b49297 100644 --- a/docs/reference/configuration.md +++ b/docs/reference/configuration.md @@ -25,20 +25,20 @@ Configuration is loaded at startup and validated before the server starts. **Description:** Address and port for the HTTP server to bind to **Type:** String (IP:PORT format) -**Default:** `127.0.0.1:8080` +**Default:** `127.0.0.1:7334` **Required:** No **Examples:** ```bash # Localhost only (development) -NGIT_BIND_ADDRESS=127.0.0.1:8080 +NGIT_BIND_ADDRESS=127.0.0.1:7334 # All interfaces (production) -NGIT_BIND_ADDRESS=0.0.0.0:8080 +NGIT_BIND_ADDRESS=0.0.0.0:7334 # IPv6 -NGIT_BIND_ADDRESS=[::1]:8080 +NGIT_BIND_ADDRESS=[::1]:7334 # Custom port NGIT_BIND_ADDRESS=127.0.0.1:3000 @@ -64,7 +64,7 @@ NGIT_BIND_ADDRESS=127.0.0.1:3000 ```bash NGIT_DOMAIN=gitnostr.com NGIT_DOMAIN=git.example.org -NGIT_DOMAIN=localhost:8080 # Development only +NGIT_DOMAIN=localhost:7334 # Development only ``` **Used for:** @@ -77,7 +77,7 @@ NGIT_DOMAIN=localhost:8080 # Development only **Notes:** - Must be accessible from the internet for production -- Include port if non-standard (e.g., `localhost:8080`) +- Include port if non-standard (e.g., `localhost:7334`) - Used in repository clone URLs: `https://{NGIT_DOMAIN}/{npub}/{repo}.git` --- @@ -1007,13 +1007,13 @@ For development, create a `.env` file in the project root: ```bash # .env file example -NGIT_DOMAIN=localhost:8080 +NGIT_DOMAIN=localhost:7334 NGIT_OWNER_NPUB=npub1alice... NGIT_RELAY_NAME="Development Relay" NGIT_RELAY_DESCRIPTION="Local development instance" NGIT_GIT_DATA_PATH=./data/git NGIT_RELAY_DATA_PATH=./data/relay -NGIT_BIND_ADDRESS=127.0.0.1:8080 +NGIT_BIND_ADDRESS=127.0.0.1:7334 RUST_LOG=debug ``` @@ -1057,7 +1057,7 @@ NGIT_RELAY_NAME="GitNostr Public Relay" NGIT_RELAY_DESCRIPTION="Public GRASP relay for open source projects" NGIT_GIT_DATA_PATH=/var/lib/ngit-grasp/git NGIT_RELAY_DATA_PATH=/var/lib/ngit-grasp/relay -NGIT_BIND_ADDRESS=0.0.0.0:8080 +NGIT_BIND_ADDRESS=0.0.0.0:7334 RUST_LOG=info,ngit_grasp=debug ``` @@ -1076,13 +1076,13 @@ RUST_LOG=info,ngit_grasp=debug ```bash # Development .env -NGIT_DOMAIN=localhost:8080 +NGIT_DOMAIN=localhost:7334 NGIT_OWNER_NPUB=npub1test... NGIT_RELAY_NAME="Dev Relay" NGIT_RELAY_DESCRIPTION="Local development" NGIT_GIT_DATA_PATH=./data/git NGIT_RELAY_DATA_PATH=./data/relay -NGIT_BIND_ADDRESS=127.0.0.1:8080 +NGIT_BIND_ADDRESS=127.0.0.1:7334 RUST_LOG=debug ``` @@ -1124,7 +1124,7 @@ When multiple configuration sources exist: ```bash # .env file -NGIT_BIND_ADDRESS=127.0.0.1:8080 +NGIT_BIND_ADDRESS=127.0.0.1:7334 # Environment variable (overrides .env) NGIT_BIND_ADDRESS=0.0.0.0:3000 cargo run -- cgit v1.2.3