From 09c7ac5775689e29fc8a37d9e1c924a4e8a3cc54 Mon Sep 17 00:00:00 2001 From: Adam Scott Date: Mon, 13 May 2024 11:08:45 -0400 Subject: [PATCH] Add way to customize host and port for `build-and-serve.sh` (#846) --- build-and-serve.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build-and-serve.sh b/build-and-serve.sh index f6f7096edb..e7ba943017 100755 --- a/build-and-serve.sh +++ b/build-and-serve.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +SERVER_HOST="${SERVER_HOST:-0.0.0.0}" +SERVER_PORT="${SERVER_PORT:-4000}" + bundle install -bundle exec jekyll serve --config _config.yml,_config.development.yml --host 0.0.0.0 +bundle exec jekyll serve --config _config.yml,_config.development.yml --host "$SERVER_HOST" --port "$SERVER_PORT"