Compare commits

...

1 Commits

Author SHA1 Message Date
Armel van Ravels
0dcffc50e1 Add startup instructions
Some checks failed
PHP Composer / build (pull_request) Failing after 7m1s
2024-08-30 22:43:30 +02:00
4 changed files with 29 additions and 0 deletions

1
.env.example Normal file
View File

@@ -0,0 +1 @@
ENVIRONMENT=development

View File

@@ -5,6 +5,8 @@ up:
start: up composer-install
composer-install:
"$(EXEC)" composer install
stop:
docker compose stop
cmd:
@@ -13,3 +15,5 @@ phpstan:
"$(EXEC)" vendor/bin/phpstan analyse src --level 8
cs-fix:
"$(EXEC)" vendor/bin/php-cs-fixer fix --allow-risky=yes
test:
"$(EXEC)" vendor/bin/pest

View File

@@ -0,0 +1,18 @@
# Armel.net
### How to run
```
cp .env.example .env
make start
```
### How to stop
```
make stop
```
### How to test
```
make test
```

View File

@@ -8,6 +8,12 @@ use Psr\Http\Message\ResponseInterface;
function get(string $uri, array $headers = [], array $cookies = []): ResponseInterface
{
try {
app(\App\Core\EnvironmentLoader::class)->load(\App\Enums\Environment::Testing);
} catch (\Exception) {
app(\App\Core\EnvironmentLoader::class)->load();
}
$router = app(Router::class);
$request = new ServerRequest(uri: $uri, method: 'GET', headers: $headers, cookieParams: $cookies);