Skip to content

Commit

Permalink
simplify run:dev and run:prod
Browse files Browse the repository at this point in the history
  • Loading branch information
Chemaclass committed Mar 16, 2024
1 parent e20f52b commit 3838424
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
},
"scripts": {
"run:dev": "PHEL_MODE=dev php -S localhost:8080 -t public",
"run:dev": "rm -rf out && php -S localhost:8080 -t public",
"run:prod": "composer build && php -S localhost:8080 -t public",
"build": "vendor/bin/phel build --no-cache",
"format": "vendor/bin/phel format",
Expand Down
3 changes: 1 addition & 2 deletions public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@

$appFile = $projectRootDir . "/out/index.php";

$phelMode = getenv('PHEL_MODE') ?: 'dev';
if ($phelMode === 'prod' && file_exists($appFile)) {
if (file_exists($appFile)) {
require_once $appFile;
} else {
Phel::run($projectRootDir, 'web-skeleton\app');
Expand Down

0 comments on commit 3838424

Please sign in to comment.