From 787be4ed2cd424701128cf6d2a1f1494ad30be54 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Thu, 23 Feb 2023 14:28:13 +0100 Subject: [PATCH] Add short script to "run" project Allows to manually test the project by opening urls in browser or calling via curl, etc. --- shell.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/shell.nix b/shell.nix index 76b890d..ad7bcfe 100644 --- a/shell.nix +++ b/shell.nix @@ -23,6 +23,15 @@ let ./vendor/bin/php-cs-fixer fix --dry-run --allow-risky=yes ''; }; + projectRun = pkgs.writeShellApplication { + name = "project-run"; + runtimeInputs = [ + pkgs.php82 + ]; + text = '' + php -S 127.0.0.1:8080 -t public + ''; + }; projectDeploy = pkgs.writeShellApplication { name = "project-deploy"; runtimeInputs = [ @@ -66,6 +75,7 @@ in pkgs.mkShell { pkgs.php82Packages.composer projectInstall projectTest + projectRun projectDeploy ];