From 5f3dd988b673397e1cdff160c01b9ed1144aee60 Mon Sep 17 00:00:00 2001 From: Conner Harkness Date: Tue, 24 Jun 2025 11:43:40 -0600 Subject: [PATCH] Changed script to require port number as first arg --- .gitignore | 1 + php-webapp-framework.sh | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 737e695..0aeca79 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +/files/ /plugins/ /*.db diff --git a/php-webapp-framework.sh b/php-webapp-framework.sh index ebb9db8..f511f09 100644 --- a/php-webapp-framework.sh +++ b/php-webapp-framework.sh @@ -1,3 +1,8 @@ #!/bin/bash -php -S 0.0.0.0:8080 index.php --enable-mbstring +# https://stackoverflow.com/a/1482133 +SCRIPT_DIR="$(dirname -- "$(readlink -f -- "$0";)";)" +cd "${SCRIPT_DIR}" + +export PHP_CLI_SERVER_WORKERS=4 +php -S 0.0.0.0:$1 index.php --enable-mbstring