Add short script to "run" project
Allows to manually test the project by opening urls in browser or calling via curl, etc.
This commit is contained in:
parent
a35d7502ca
commit
787be4ed2c
1 changed files with 10 additions and 0 deletions
10
shell.nix
10
shell.nix
|
@ -23,6 +23,15 @@ let
|
||||||
./vendor/bin/php-cs-fixer fix --dry-run --allow-risky=yes
|
./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 {
|
projectDeploy = pkgs.writeShellApplication {
|
||||||
name = "project-deploy";
|
name = "project-deploy";
|
||||||
runtimeInputs = [
|
runtimeInputs = [
|
||||||
|
@ -66,6 +75,7 @@ in pkgs.mkShell {
|
||||||
pkgs.php82Packages.composer
|
pkgs.php82Packages.composer
|
||||||
projectInstall
|
projectInstall
|
||||||
projectTest
|
projectTest
|
||||||
|
projectRun
|
||||||
projectDeploy
|
projectDeploy
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue