From ebffa15c7c9a3c8b924794690edb9748f0c2d318 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Fri, 19 Jun 2020 17:35:24 +0200 Subject: [PATCH] add 'make serve' command Starts up PHP's built-in webserver in the website/ directory. Useful for testing and development. See #1831. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index facd3f30..787baeb2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,6 +141,11 @@ if (BUILD_API) COMMAND ln -sf ${PROJECT_SOURCE_DIR}/website/${wp} ${PROJECT_BINARY_DIR}/website/ ) endforeach() + + add_custom_target(serve + php -S 127.0.0.1:8088 + WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/website + ) endif() #----------------------------------------------------------------------------- -- 2.39.5