From 5e33d4c311220cc68aaf5e34153136bb4b337c2b Mon Sep 17 00:00:00 2001 From: Gerard Guillemas Martos Date: Tue, 21 May 2024 10:18:14 +0200 Subject: [PATCH] Bind to loopback address by default (#4054) --- CONTRIBUTING.md | 2 +- src/cli/start.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f0260875..79599ed3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,7 +44,7 @@ To listen to code changes as you develop, use the following command: cargo watch -x 'run --no-default-features --features storage-mem,http,scripting -- start --log trace --user root --pass root memory' ``` -SurrealDB runs by default on port 8000. To change the default port, use the following command: +By default, SurrealDB runs locally on port 8000. To change the default listening address or port, use the following command: ```bash cargo run --no-default-features --features storage-mem,http,scripting -- start --log trace --user root --pass root --bind 0.0.0.0:9000 memory diff --git a/src/cli/start.rs b/src/cli/start.rs index 018b4880..1cabd55f 100644 --- a/src/cli/start.rs +++ b/src/cli/start.rs @@ -92,9 +92,9 @@ pub struct StartCommandArguments { #[arg(env = "SURREAL_CLIENT_IP", long)] #[arg(default_value = "socket", value_enum)] client_ip: ClientIp, - #[arg(help = "The hostname or ip address to listen for connections on")] + #[arg(help = "The hostname or IP address to listen for connections on")] #[arg(env = "SURREAL_BIND", short = 'b', long = "bind")] - #[arg(default_value = "0.0.0.0:8000")] + #[arg(default_value = "127.0.0.1:8000")] listen_addresses: Vec, //