Skip to content

Commit

Permalink
Improvement: use plain php webserver
Browse files Browse the repository at this point in the history
  • Loading branch information
chrfritsch authored Mar 11, 2020
1 parent 4cdc1b1 commit 1f06c96
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions lib/stages/start_web_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,11 @@
_stage_start_web_server() {
printf "Starting web server\n\n"

local composer_bin_dir
local docroot

docroot=$(get_distribution_docroot)
composer_bin_dir=$(get_composer_bin_directory)

local drush="${DRUPAL_TESTING_DRUPAL_INSTALLATION_DIRECTORY}/${composer_bin_dir}/drush --root=${docroot}"

if ! port_is_open "${DRUPAL_TESTING_HTTP_HOST}" "${DRUPAL_TESTING_HTTP_PORT}"; then
local runserver_flags=""

if ! ${DRUPAL_TESTING_VERBOSE}; then
runserver_flags="--quiet"
fi

${drush} ${runserver_flags} runserver "http://${DRUPAL_TESTING_HTTP_HOST}:${DRUPAL_TESTING_HTTP_PORT}" >/dev/null 2>&1 &
wait_for_port "${DRUPAL_TESTING_HTTP_HOST}" "${DRUPAL_TESTING_HTTP_PORT}"
php -S "${DRUPAL_TESTING_HTTP_HOST}":"${DRUPAL_TESTING_HTTP_PORT}" -t "${docroot}" >/dev/null 2>&1 &
wait_for_port "${DRUPAL_TESTING_HTTP_HOST}" "${DRUPAL_TESTING_HTTP_PORT}" 30
fi
}
}

0 comments on commit 1f06c96

Please sign in to comment.