Skip to content

Commit a4e60c2

Browse files
committed
Added some documentation
1 parent 1aa5b5d commit a4e60c2

File tree

2 files changed

+77
-2
lines changed

2 files changed

+77
-2
lines changed

README.md

+21-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
# Getting Started with Create React App
1+
# Jump App Frontend based on React
22

3-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
3+
This repository includes a microservice based on React and TypeScript that is a component develop for Jump App application. The idea of this microservice is implement a Frontend which will be able to send HTTP and gRPC request to a respective backend.
4+
5+
The idea of this connection to the backend is to send a JSON or Protobuf object in order to be able to make a set of "jumps" (connection between services) that have been implemented as microservices in different languages (Golang, Python, Java or Quarkus).
46

7+
Please review the following section for more information about this microservice.
58
## Available Scripts
69

10+
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
11+
712
In the project directory, you can run:
813

914
### `npm start`
@@ -39,6 +44,20 @@ Instead, it will copy all the configuration files and the transitive dependencie
3944

4045
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
4146

47+
## gRPC Support
48+
49+
In order to be able to test some features integrated in Istio (based on Envoy), gRPC support has been implemented. With this new feature, it is possible to sent gRPC request in the same way as HTTP requests.
50+
51+
It is important to bear in mind that a gRPC proxy (E.g. Envoy) is required to handle the gRPC requests and redirect them to the a specific backend. For this reason, the following command will be useful in local testing to make available this envoy service locally:
52+
53+
```$bash
54+
envoy -c local/envoy.yaml
55+
```
56+
57+
NOTE: It is required to install envoy previously. Visit [link](https://www.envoyproxy.io/docs/envoy/latest/start/install) for more information.
58+
59+
Please visit [gRPC Web](https://github.com/grpc/grpc-web) for more information about this integration.
60+
4261
## Learn More
4362

4463
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

local/envoy.yaml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
admin:
2+
access_log_path: /tmp/admin_access.log
3+
address:
4+
socket_address: { address: 0.0.0.0, port_value: 10001 }
5+
6+
static_resources:
7+
listeners:
8+
- name: listener_0
9+
enable_reuse_port: false
10+
address:
11+
socket_address: { address: 0.0.0.0, port_value: 10000 }
12+
filter_chains:
13+
- filters:
14+
- name: envoy.filters.network.http_connection_manager
15+
typed_config:
16+
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
17+
codec_type: auto
18+
stat_prefix: ingress_http
19+
route_config:
20+
name: local_route
21+
virtual_hosts:
22+
- name: local_service
23+
domains: ["*"]
24+
routes:
25+
- match: { prefix: "/" }
26+
route:
27+
cluster: back_golang_service
28+
timeout: 0s
29+
max_stream_duration:
30+
grpc_timeout_header_max: 0s
31+
cors:
32+
allow_origin_string_match:
33+
- prefix: "*"
34+
allow_methods: GET, PUT, DELETE, POST, OPTIONS
35+
allow_headers: keep-alive,user-agent,cache-control,content-type,content-transfer-encoding,custom-header-1,x-accept-content-transfer-encoding,x-accept-response-streaming,x-user-agent,x-grpc-web,grpc-timeout
36+
max_age: "1728000"
37+
expose_headers: custom-header-1,grpc-status,grpc-message
38+
http_filters:
39+
- name: envoy.filters.http.grpc_web
40+
- name: envoy.filters.http.cors
41+
- name: envoy.filters.http.router
42+
clusters:
43+
- name: back_golang_service
44+
connect_timeout: 0.25s
45+
type: logical_dns
46+
http2_protocol_options: {}
47+
lb_policy: round_robin
48+
load_assignment:
49+
cluster_name: cluster_0
50+
endpoints:
51+
- lb_endpoints:
52+
- endpoint:
53+
address:
54+
socket_address:
55+
address: golang.acidonpe.com
56+
port_value: 50051

0 commit comments

Comments
 (0)