-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
30 changed files
with
221 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
map $http_upgrade $connection_upgrade { | ||
default upgrade; | ||
'' close; | ||
} | ||
|
||
server { | ||
server_name _; | ||
|
||
location /connection { | ||
proxy_pass http:https://buggregator-ws:8089/connection; | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection $connection_upgrade; | ||
proxy_set_header Host $host; | ||
} | ||
|
||
location /example/call { | ||
proxy_pass http:https://buggregator-examples:8000; | ||
proxy_set_header Host $http_host; | ||
} | ||
|
||
location /github { | ||
proxy_pass http:https://buggregator-api:8000; | ||
proxy_set_header Host $http_host; | ||
} | ||
|
||
location /api { | ||
proxy_pass http:https://buggregator-api:8000; | ||
proxy_set_header Host $http_host; | ||
} | ||
|
||
location / { | ||
proxy_pass http:https://buggregator-spa:3000; | ||
proxy_set_header Host $http_host; | ||
} | ||
|
||
listen 80; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Endpoint\Http\Controller; | ||
|
||
use App\Application\Http\Response\ResourceInterface; | ||
use App\Endpoint\Http\Resource\TeamCollection; | ||
use App\Endpoint\Http\Resource\TeamResource; | ||
use Spiral\Router\Annotation\Route; | ||
|
||
final readonly class TeamAction | ||
{ | ||
#[Route(route: 'team', name: 'team', methods: ['GET'], group: 'api')] | ||
public function __invoke(): ResourceInterface | ||
{ | ||
return new TeamCollection([ | ||
[ | ||
'name' => 'Pavel Buchnev', | ||
'role' => 'Creator of Buggregator', | ||
'avatar' => 'https://avatars.githubusercontent.com/u/773481?v=4', | ||
'github' => 'https://github.com/butschster', | ||
], | ||
[ | ||
'name' => 'Aleksei Gagarin', | ||
'role' => 'PHP developer', | ||
'avatar' => 'https://avatars.githubusercontent.com/u/4152481?v=4', | ||
'github' => 'https://github.com/roxblnfk', | ||
], | ||
[ | ||
'name' => 'Andrey Kuchuk', | ||
'role' => 'Frontend developer', | ||
'avatar' => 'https://avatars.githubusercontent.com/u/13301570?v=4', | ||
'github' => 'https://github.com/Kreezag', | ||
], | ||
], TeamResource::class); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Endpoint\Http\Resource; | ||
|
||
use App\Application\Http\Response\ResourceCollection; | ||
|
||
final class TeamCollection extends ResourceCollection | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\Endpoint\Http\Resource; | ||
|
||
use App\Application\Http\Response\JsonResource; | ||
|
||
final class TeamResource extends JsonResource | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.