Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
fix: upgrade ftl for new ingress port (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
wesbillman authored Jun 4, 2024
1 parent 78ff888 commit b7b9166
Show file tree
Hide file tree
Showing 26 changed files with 50 additions and 46 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ Flutter is better run via an [IDE](https://docs.flutter.dev/get-started/editor?t
Add a new item to your cart using the command-line:

```bash
curl -i --json '{"userId": "Larry", "item": {"productId": "OLJCESPC7Z", "quantity": 1}}' localhost:8892/ingress/cart/add
curl -i --json '{"userId": "Larry", "item": {"productId": "OLJCESPC7Z", "quantity": 1}}' localhost:8891/cart/add
```

Response

```
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Expand Down Expand Up @@ -90,9 +92,11 @@ curl --json '{
"expirationMonth": 6
}
}
' localhost:8892/ingress/checkout/Larry | jq .
' localhost:8891/checkout/Larry | jq .
```

Response

```
{
"id": "19031e2c-a4b3-49fe-bbb8-464bc8707559",
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion bin/ftl
10 changes: 5 additions & 5 deletions go/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ type ErrorResponse struct {
Error string `json:"error"`
}

// Example: curl -i http://localhost:8892/ingress/http/users/123/posts?postId=456
// Error Example: curl -i http://localhost:8892/ingress/http/users/000/posts?postId=456
// Example: curl -i http://localhost:8891/http/users/123/posts?postId=456
// Error Example: curl -i http://localhost:8891/http/users/000/posts?postId=456
//
//ftl:ingress http GET /http/users/{userId}/posts
func Get(ctx context.Context, req builtin.HttpRequest[GetRequest]) (builtin.HttpResponse[GetResponse, ErrorResponse], error) {
Expand Down Expand Up @@ -58,7 +58,7 @@ type PostResponse struct {
Success bool `json:"success"`
}

// Example: curl -i --json '{"user_id": 123, "post_id": 345}' http://localhost:8892/ingress/http/users
// Example: curl -i --json '{"user_id": 123, "post_id": 345}' http://localhost:8891/http/users
//
//ftl:ingress http POST /http/users
func Post(ctx context.Context, req builtin.HttpRequest[PostRequest]) (builtin.HttpResponse[PostResponse, ftl.Unit], error) {
Expand All @@ -76,7 +76,7 @@ type PutRequest struct {

type PutResponse struct{}

// Example: curl -X PUT http://localhost:8892/ingress/http/users/123 -d '{"postId": "123"}'
// Example: curl -X PUT http://localhost:8891/http/users/123 -d '{"postId": "123"}'
//
//ftl:ingress http PUT /http/users/{userId}
func Put(ctx context.Context, req builtin.HttpRequest[PutRequest]) (builtin.HttpResponse[PutResponse, ftl.Unit], error) {
Expand All @@ -92,7 +92,7 @@ type DeleteRequest struct {

type DeleteResponse struct{}

// Example: curl -X DELETE http://localhost:8892/ingress/http/users/123
// Example: curl -X DELETE http://localhost:8891/http/users/123
//
//ftl:ingress http DELETE /http/users/{userId}
func Delete(ctx context.Context, req builtin.HttpRequest[DeleteRequest]) (builtin.HttpResponse[DeleteResponse, ftl.Unit], error) {
Expand Down
10 changes: 5 additions & 5 deletions kotlin/http/src/main/kotlin/ftl/http/Http.kt
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ data class DeleteRequest(
@Json("userId") val userID: String,
)

// Example: curl -i http://localhost:8892/ingress/http/users/123/posts?postId=456
// Error Example: curl -i http://localhost:8892/ingress/http/users/000/posts?postId=456
// Example: curl -i http://localhost:8891/http/users/123/posts?postId=456
// Error Example: curl -i http://localhost:8891/http/users/000/posts?postId=456
@HttpIngress(Method.GET, "/http/users/{userId}/posts")
fun `get`(context: Context, req: HttpRequest<GetRequest>): HttpResponse<GetResponse, String> {
return HttpResponse(
Expand All @@ -55,7 +55,7 @@ fun `get`(context: Context, req: HttpRequest<GetRequest>): HttpResponse<GetRespo
)
}

// Example: curl -i --json '{"user_id": 123, "post_id": 345}' http://localhost:8892/ingress/http/users
// Example: curl -i --json '{"user_id": 123, "post_id": 345}' http://localhost:8891/http/users
@HttpIngress(Method.POST, "/http/users")
fun post(context: Context, req: HttpRequest<PostRequest>): HttpResponse<PostResponse, String> {
return HttpResponse(
Expand All @@ -65,7 +65,7 @@ fun post(context: Context, req: HttpRequest<PostRequest>): HttpResponse<PostResp
)
}

// Example: curl -X PUT http://localhost:8892/ingress/http/users/123 -d '{"postId": "123"}'
// Example: curl -X PUT http://localhost:8891/http/users/123 -d '{"postId": "123"}'
@HttpIngress(Method.PUT, "/http/users/{userId}")
fun put(context: Context, req: HttpRequest<PutRequest>): HttpResponse<Empty, String> {
return HttpResponse(
Expand All @@ -75,7 +75,7 @@ fun put(context: Context, req: HttpRequest<PutRequest>): HttpResponse<Empty, Str
)
}

// Example: curl -X DELETE http://localhost:8892/ingress/http/users/123
// Example: curl -X DELETE http://localhost:8891/http/users/123
@HttpIngress(Method.DELETE, "/http/users/{userId}")
fun delete(context: Context, req: HttpRequest<DeleteRequest>): HttpResponse<Empty, String> {
return HttpResponse(
Expand Down
2 changes: 1 addition & 1 deletion online-boutique/backend/services/ad/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.22.2
replace github.com/TBD54566975/ftl/examples/online-boutique => ../..

require (
github.com/TBD54566975/ftl v0.231.1
github.com/TBD54566975/ftl v0.234.0
github.com/TBD54566975/ftl/examples/online-boutique v0.0.0-00010101000000-000000000000
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
)
Expand Down
4 changes: 2 additions & 2 deletions online-boutique/backend/services/ad/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ connectrpc.com/grpcreflect v1.2.0 h1:Q6og1S7HinmtbEuBvARLNwYmTbhEGRpHDhqrPNlmK+U
connectrpc.com/grpcreflect v1.2.0/go.mod h1:nwSOKmE8nU5u/CidgHtPYk1PFI3U9ignz7iDMxOYkSY=
connectrpc.com/otelconnect v0.7.0 h1:ZH55ZZtcJOTKWWLy3qmL4Pam4RzRWBJFOqTPyAqCXkY=
connectrpc.com/otelconnect v0.7.0/go.mod h1:Bt2ivBymHZHqxvo4HkJ0EwHuUzQN6k2l0oH+mp/8nwc=
github.com/TBD54566975/ftl v0.231.1 h1:qudqDPuTxGGveJu2KkYiwjFvIqCwUgXMDWhCS0RdVT8=
github.com/TBD54566975/ftl v0.231.1/go.mod h1:oappWBTwAwuiN/6oVDeHdNLuFnKzq3PB0UZqc1AaXV0=
github.com/TBD54566975/ftl v0.234.0 h1:Mq8N1NpnW/Y0r+8lgVYtI4Otqu86/WxpXToAIZHl4+c=
github.com/TBD54566975/ftl v0.234.0/go.mod h1:oappWBTwAwuiN/6oVDeHdNLuFnKzq3PB0UZqc1AaXV0=
github.com/alecthomas/assert/v2 v2.10.0 h1:jjRCHsj6hBJhkmhznrCzoNpbA3zqy0fYiUcYZP/GkPY=
github.com/alecthomas/assert/v2 v2.10.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/concurrency v0.0.2 h1:Q3kGPtLbleMbH9lHX5OBFvJygfyFw29bXZKBg+IEVuo=
Expand Down
2 changes: 1 addition & 1 deletion online-boutique/backend/services/cart/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.22.2
replace github.com/TBD54566975/ftl/examples/online-boutique => ../..

require (
github.com/TBD54566975/ftl v0.231.1
github.com/TBD54566975/ftl v0.234.0
github.com/hashicorp/golang-lru/v2 v2.0.7
)

Expand Down
4 changes: 2 additions & 2 deletions online-boutique/backend/services/cart/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ connectrpc.com/grpcreflect v1.2.0 h1:Q6og1S7HinmtbEuBvARLNwYmTbhEGRpHDhqrPNlmK+U
connectrpc.com/grpcreflect v1.2.0/go.mod h1:nwSOKmE8nU5u/CidgHtPYk1PFI3U9ignz7iDMxOYkSY=
connectrpc.com/otelconnect v0.7.0 h1:ZH55ZZtcJOTKWWLy3qmL4Pam4RzRWBJFOqTPyAqCXkY=
connectrpc.com/otelconnect v0.7.0/go.mod h1:Bt2ivBymHZHqxvo4HkJ0EwHuUzQN6k2l0oH+mp/8nwc=
github.com/TBD54566975/ftl v0.231.1 h1:qudqDPuTxGGveJu2KkYiwjFvIqCwUgXMDWhCS0RdVT8=
github.com/TBD54566975/ftl v0.231.1/go.mod h1:oappWBTwAwuiN/6oVDeHdNLuFnKzq3PB0UZqc1AaXV0=
github.com/TBD54566975/ftl v0.234.0 h1:Mq8N1NpnW/Y0r+8lgVYtI4Otqu86/WxpXToAIZHl4+c=
github.com/TBD54566975/ftl v0.234.0/go.mod h1:oappWBTwAwuiN/6oVDeHdNLuFnKzq3PB0UZqc1AaXV0=
github.com/alecthomas/assert/v2 v2.10.0 h1:jjRCHsj6hBJhkmhznrCzoNpbA3zqy0fYiUcYZP/GkPY=
github.com/alecthomas/assert/v2 v2.10.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/concurrency v0.0.2 h1:Q3kGPtLbleMbH9lHX5OBFvJygfyFw29bXZKBg+IEVuo=
Expand Down
2 changes: 1 addition & 1 deletion online-boutique/backend/services/checkout/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.22.2
replace github.com/TBD54566975/ftl/examples/online-boutique => ../..

require (
github.com/TBD54566975/ftl v0.231.1
github.com/TBD54566975/ftl v0.234.0
github.com/TBD54566975/ftl/examples/online-boutique v0.0.0-00010101000000-000000000000
github.com/google/uuid v1.6.0
)
Expand Down
4 changes: 2 additions & 2 deletions online-boutique/backend/services/checkout/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ connectrpc.com/grpcreflect v1.2.0 h1:Q6og1S7HinmtbEuBvARLNwYmTbhEGRpHDhqrPNlmK+U
connectrpc.com/grpcreflect v1.2.0/go.mod h1:nwSOKmE8nU5u/CidgHtPYk1PFI3U9ignz7iDMxOYkSY=
connectrpc.com/otelconnect v0.7.0 h1:ZH55ZZtcJOTKWWLy3qmL4Pam4RzRWBJFOqTPyAqCXkY=
connectrpc.com/otelconnect v0.7.0/go.mod h1:Bt2ivBymHZHqxvo4HkJ0EwHuUzQN6k2l0oH+mp/8nwc=
github.com/TBD54566975/ftl v0.231.1 h1:qudqDPuTxGGveJu2KkYiwjFvIqCwUgXMDWhCS0RdVT8=
github.com/TBD54566975/ftl v0.231.1/go.mod h1:oappWBTwAwuiN/6oVDeHdNLuFnKzq3PB0UZqc1AaXV0=
github.com/TBD54566975/ftl v0.234.0 h1:Mq8N1NpnW/Y0r+8lgVYtI4Otqu86/WxpXToAIZHl4+c=
github.com/TBD54566975/ftl v0.234.0/go.mod h1:oappWBTwAwuiN/6oVDeHdNLuFnKzq3PB0UZqc1AaXV0=
github.com/alecthomas/assert/v2 v2.10.0 h1:jjRCHsj6hBJhkmhznrCzoNpbA3zqy0fYiUcYZP/GkPY=
github.com/alecthomas/assert/v2 v2.10.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/concurrency v0.0.2 h1:Q3kGPtLbleMbH9lHX5OBFvJygfyFw29bXZKBg+IEVuo=
Expand Down
2 changes: 1 addition & 1 deletion online-boutique/backend/services/currency/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.22.2
replace github.com/TBD54566975/ftl/examples/online-boutique => ../..

require (
github.com/TBD54566975/ftl v0.231.1
github.com/TBD54566975/ftl v0.234.0
github.com/TBD54566975/ftl/examples/online-boutique v0.0.0-00010101000000-000000000000
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
)
Expand Down
4 changes: 2 additions & 2 deletions online-boutique/backend/services/currency/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ connectrpc.com/grpcreflect v1.2.0 h1:Q6og1S7HinmtbEuBvARLNwYmTbhEGRpHDhqrPNlmK+U
connectrpc.com/grpcreflect v1.2.0/go.mod h1:nwSOKmE8nU5u/CidgHtPYk1PFI3U9ignz7iDMxOYkSY=
connectrpc.com/otelconnect v0.7.0 h1:ZH55ZZtcJOTKWWLy3qmL4Pam4RzRWBJFOqTPyAqCXkY=
connectrpc.com/otelconnect v0.7.0/go.mod h1:Bt2ivBymHZHqxvo4HkJ0EwHuUzQN6k2l0oH+mp/8nwc=
github.com/TBD54566975/ftl v0.231.1 h1:qudqDPuTxGGveJu2KkYiwjFvIqCwUgXMDWhCS0RdVT8=
github.com/TBD54566975/ftl v0.231.1/go.mod h1:oappWBTwAwuiN/6oVDeHdNLuFnKzq3PB0UZqc1AaXV0=
github.com/TBD54566975/ftl v0.234.0 h1:Mq8N1NpnW/Y0r+8lgVYtI4Otqu86/WxpXToAIZHl4+c=
github.com/TBD54566975/ftl v0.234.0/go.mod h1:oappWBTwAwuiN/6oVDeHdNLuFnKzq3PB0UZqc1AaXV0=
github.com/alecthomas/assert/v2 v2.10.0 h1:jjRCHsj6hBJhkmhznrCzoNpbA3zqy0fYiUcYZP/GkPY=
github.com/alecthomas/assert/v2 v2.10.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/concurrency v0.0.2 h1:Q3kGPtLbleMbH9lHX5OBFvJygfyFw29bXZKBg+IEVuo=
Expand Down
2 changes: 1 addition & 1 deletion online-boutique/backend/services/payment/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.22.2
replace github.com/TBD54566975/ftl/examples/online-boutique => ../..

require (
github.com/TBD54566975/ftl v0.231.1
github.com/TBD54566975/ftl v0.234.0
github.com/google/uuid v1.6.0
)

Expand Down
4 changes: 2 additions & 2 deletions online-boutique/backend/services/payment/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ connectrpc.com/grpcreflect v1.2.0 h1:Q6og1S7HinmtbEuBvARLNwYmTbhEGRpHDhqrPNlmK+U
connectrpc.com/grpcreflect v1.2.0/go.mod h1:nwSOKmE8nU5u/CidgHtPYk1PFI3U9ignz7iDMxOYkSY=
connectrpc.com/otelconnect v0.7.0 h1:ZH55ZZtcJOTKWWLy3qmL4Pam4RzRWBJFOqTPyAqCXkY=
connectrpc.com/otelconnect v0.7.0/go.mod h1:Bt2ivBymHZHqxvo4HkJ0EwHuUzQN6k2l0oH+mp/8nwc=
github.com/TBD54566975/ftl v0.231.1 h1:qudqDPuTxGGveJu2KkYiwjFvIqCwUgXMDWhCS0RdVT8=
github.com/TBD54566975/ftl v0.231.1/go.mod h1:oappWBTwAwuiN/6oVDeHdNLuFnKzq3PB0UZqc1AaXV0=
github.com/TBD54566975/ftl v0.234.0 h1:Mq8N1NpnW/Y0r+8lgVYtI4Otqu86/WxpXToAIZHl4+c=
github.com/TBD54566975/ftl v0.234.0/go.mod h1:oappWBTwAwuiN/6oVDeHdNLuFnKzq3PB0UZqc1AaXV0=
github.com/alecthomas/assert/v2 v2.10.0 h1:jjRCHsj6hBJhkmhznrCzoNpbA3zqy0fYiUcYZP/GkPY=
github.com/alecthomas/assert/v2 v2.10.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/concurrency v0.0.2 h1:Q3kGPtLbleMbH9lHX5OBFvJygfyFw29bXZKBg+IEVuo=
Expand Down
2 changes: 1 addition & 1 deletion online-boutique/backend/services/productcatalog/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.22.2
replace github.com/TBD54566975/ftl/examples/online-boutique => ../..

require (
github.com/TBD54566975/ftl v0.231.1
github.com/TBD54566975/ftl v0.234.0
github.com/TBD54566975/ftl/examples/online-boutique v0.0.0-00010101000000-000000000000
)

Expand Down
4 changes: 2 additions & 2 deletions online-boutique/backend/services/productcatalog/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ connectrpc.com/grpcreflect v1.2.0 h1:Q6og1S7HinmtbEuBvARLNwYmTbhEGRpHDhqrPNlmK+U
connectrpc.com/grpcreflect v1.2.0/go.mod h1:nwSOKmE8nU5u/CidgHtPYk1PFI3U9ignz7iDMxOYkSY=
connectrpc.com/otelconnect v0.7.0 h1:ZH55ZZtcJOTKWWLy3qmL4Pam4RzRWBJFOqTPyAqCXkY=
connectrpc.com/otelconnect v0.7.0/go.mod h1:Bt2ivBymHZHqxvo4HkJ0EwHuUzQN6k2l0oH+mp/8nwc=
github.com/TBD54566975/ftl v0.231.1 h1:qudqDPuTxGGveJu2KkYiwjFvIqCwUgXMDWhCS0RdVT8=
github.com/TBD54566975/ftl v0.231.1/go.mod h1:oappWBTwAwuiN/6oVDeHdNLuFnKzq3PB0UZqc1AaXV0=
github.com/TBD54566975/ftl v0.234.0 h1:Mq8N1NpnW/Y0r+8lgVYtI4Otqu86/WxpXToAIZHl4+c=
github.com/TBD54566975/ftl v0.234.0/go.mod h1:oappWBTwAwuiN/6oVDeHdNLuFnKzq3PB0UZqc1AaXV0=
github.com/alecthomas/assert/v2 v2.10.0 h1:jjRCHsj6hBJhkmhznrCzoNpbA3zqy0fYiUcYZP/GkPY=
github.com/alecthomas/assert/v2 v2.10.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/concurrency v0.0.2 h1:Q3kGPtLbleMbH9lHX5OBFvJygfyFw29bXZKBg+IEVuo=
Expand Down
2 changes: 1 addition & 1 deletion online-boutique/backend/services/recommendation/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.22.2

replace github.com/TBD54566975/ftl/examples/online-boutique => ../..

require github.com/TBD54566975/ftl v0.231.1
require github.com/TBD54566975/ftl v0.234.0

require (
connectrpc.com/connect v1.16.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions online-boutique/backend/services/recommendation/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ connectrpc.com/grpcreflect v1.2.0 h1:Q6og1S7HinmtbEuBvARLNwYmTbhEGRpHDhqrPNlmK+U
connectrpc.com/grpcreflect v1.2.0/go.mod h1:nwSOKmE8nU5u/CidgHtPYk1PFI3U9ignz7iDMxOYkSY=
connectrpc.com/otelconnect v0.7.0 h1:ZH55ZZtcJOTKWWLy3qmL4Pam4RzRWBJFOqTPyAqCXkY=
connectrpc.com/otelconnect v0.7.0/go.mod h1:Bt2ivBymHZHqxvo4HkJ0EwHuUzQN6k2l0oH+mp/8nwc=
github.com/TBD54566975/ftl v0.231.1 h1:qudqDPuTxGGveJu2KkYiwjFvIqCwUgXMDWhCS0RdVT8=
github.com/TBD54566975/ftl v0.231.1/go.mod h1:oappWBTwAwuiN/6oVDeHdNLuFnKzq3PB0UZqc1AaXV0=
github.com/TBD54566975/ftl v0.234.0 h1:Mq8N1NpnW/Y0r+8lgVYtI4Otqu86/WxpXToAIZHl4+c=
github.com/TBD54566975/ftl v0.234.0/go.mod h1:oappWBTwAwuiN/6oVDeHdNLuFnKzq3PB0UZqc1AaXV0=
github.com/alecthomas/assert/v2 v2.10.0 h1:jjRCHsj6hBJhkmhznrCzoNpbA3zqy0fYiUcYZP/GkPY=
github.com/alecthomas/assert/v2 v2.10.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/concurrency v0.0.2 h1:Q3kGPtLbleMbH9lHX5OBFvJygfyFw29bXZKBg+IEVuo=
Expand Down
2 changes: 1 addition & 1 deletion online-boutique/backend/services/shipping/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.22.2

replace github.com/TBD54566975/ftl/examples/online-boutique => ../..

require github.com/TBD54566975/ftl v0.231.1
require github.com/TBD54566975/ftl v0.234.0

require (
connectrpc.com/connect v1.16.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions online-boutique/backend/services/shipping/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ connectrpc.com/grpcreflect v1.2.0 h1:Q6og1S7HinmtbEuBvARLNwYmTbhEGRpHDhqrPNlmK+U
connectrpc.com/grpcreflect v1.2.0/go.mod h1:nwSOKmE8nU5u/CidgHtPYk1PFI3U9ignz7iDMxOYkSY=
connectrpc.com/otelconnect v0.7.0 h1:ZH55ZZtcJOTKWWLy3qmL4Pam4RzRWBJFOqTPyAqCXkY=
connectrpc.com/otelconnect v0.7.0/go.mod h1:Bt2ivBymHZHqxvo4HkJ0EwHuUzQN6k2l0oH+mp/8nwc=
github.com/TBD54566975/ftl v0.231.1 h1:qudqDPuTxGGveJu2KkYiwjFvIqCwUgXMDWhCS0RdVT8=
github.com/TBD54566975/ftl v0.231.1/go.mod h1:oappWBTwAwuiN/6oVDeHdNLuFnKzq3PB0UZqc1AaXV0=
github.com/TBD54566975/ftl v0.234.0 h1:Mq8N1NpnW/Y0r+8lgVYtI4Otqu86/WxpXToAIZHl4+c=
github.com/TBD54566975/ftl v0.234.0/go.mod h1:oappWBTwAwuiN/6oVDeHdNLuFnKzq3PB0UZqc1AaXV0=
github.com/alecthomas/assert/v2 v2.10.0 h1:jjRCHsj6hBJhkmhznrCzoNpbA3zqy0fYiUcYZP/GkPY=
github.com/alecthomas/assert/v2 v2.10.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/concurrency v0.0.2 h1:Q3kGPtLbleMbH9lHX5OBFvJygfyFw29bXZKBg+IEVuo=
Expand Down
6 changes: 3 additions & 3 deletions online-boutique/mobile/lib/api/ftl_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class FTLHttpClient {
}) {
Uri uri;
if (requestJson == null || requestJson.isEmpty) {
uri = Uri.http("localhost:8892", '/ingress$path');
uri = Uri.http("localhost:8891", path);
} else {
uri = Uri.http("localhost:8892", '/ingress$path', {'@json': requestJson});
uri = Uri.http("localhost:8891", path, {'@json': requestJson});
}
return httpClient.get(uri, headers: headers);
}
Expand All @@ -43,7 +43,7 @@ class FTLHttpClient {
Map<String, String>? headers,
}) {
return httpClient.post(
Uri.http(baseUrl, '/ingress$path'),
Uri.http(baseUrl, path),
body: json.encode(request),
headers: headers,
);
Expand Down
2 changes: 1 addition & 1 deletion online-boutique/mobile/lib/utils/api_providers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:online_boutique/api/ftl_client.dart';
import 'package:online_boutique/api/productcatalog.dart';

final ftlClientProvider = Provider<FTLHttpClient>((ref) {
final host = Platform.isAndroid ? '10.0.2.2' : 'localhost:8892';
final host = Platform.isAndroid ? '10.0.2.2' : 'localhost:8891';

FTLHttpClient.initialize(
baseUrl: host,
Expand Down
6 changes: 3 additions & 3 deletions online-boutique/mobile/templates/ftl_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class FTLHttpClient {
}) {
Uri uri;
if (requestJson == null || requestJson.isEmpty) {
uri = Uri.http("localhost:8892", '/ingress$path');
uri = Uri.http("localhost:8891", path);
} else {
uri = Uri.http("localhost:8892", '/ingress$path', {'@json': requestJson});
uri = Uri.http("localhost:8891", path, {'@json': requestJson});
}
return httpClient.get(uri, headers: headers);
}
Expand All @@ -43,7 +43,7 @@ class FTLHttpClient {
Map<String, String>? headers,
}) {
return httpClient.post(
Uri.http(baseUrl, '/ingress$path'),
Uri.http(baseUrl, path),
body: json.encode(request),
headers: headers,
);
Expand Down
2 changes: 1 addition & 1 deletion online-boutique/web/src/features/products/ProductPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const ProductPage = () => {
const [product, setProduct] = useState<Product | undefined>()

useEffect(() => {
const productsClient = new ProductcatalogClient('http://localhost:8892/ingress')
const productsClient = new ProductcatalogClient('http://localhost:8891')
productsClient.list({}).then((response) => {
setProduct(response.products.find((product) => product.id.toLowerCase() === productId?.toLowerCase()))
})
Expand Down
2 changes: 1 addition & 1 deletion online-boutique/web/src/features/products/ProductsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const ProductsPage = () => {
const [products, setProducts] = useState<Product[]>([])

useEffect(() => {
const productsClient = new ProductcatalogClient('http://localhost:8892/ingress')
const productsClient = new ProductcatalogClient('http://localhost:8891')
productsClient.list({}).then((response) => setProducts(response.products || []))
}, [])

Expand Down

0 comments on commit b7b9166

Please sign in to comment.