Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tpps88206/michael-angular-go-grpc-example
The example of gRPC project with Angular and Go
https://github.com/tpps88206/michael-angular-go-grpc-example
angular angular2 angular4 angular5 angular6 angular7 angular8 envoy envoy-proxy envoyproxy go golang grpc grpc-web protocol-buffers proxy
Last synced: 2 months ago
JSON representation
The example of gRPC project with Angular and Go
- Host: GitHub
- URL: https://github.com/tpps88206/michael-angular-go-grpc-example
- Owner: tpps88206
- License: mit
- Created: 2019-06-12T09:19:05.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T06:22:32.000Z (about 2 years ago)
- Last Synced: 2024-10-29T23:08:17.527Z (3 months ago)
- Topics: angular, angular2, angular4, angular5, angular6, angular7, angular8, envoy, envoy-proxy, envoyproxy, go, golang, grpc, grpc-web, protocol-buffers, proxy
- Language: JavaScript
- Homepage: https://medium.com/micheh/%E7%B5%90%E5%90%88-grpc-%E5%9C%A8-angular-%E8%88%87-go-%E4%B9%8B%E4%B8%AD-%E4%BD%BF%E7%94%A8-docker-%E5%AF%A6%E4%BD%9C-d682d756319
- Size: 3.04 MB
- Stars: 29
- Watchers: 3
- Forks: 8
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# angular-go-grpc-example
The example of gRPC project with Angular and Go.
![Structure](structure.png)
## Status
[![Build Status](https://travis-ci.org/tpps88206/angular-go-grpc-example.svg?branch=master)](https://travis-ci.org/tpps88206/angular-go-grpc-example)
Platform|Image size|Image version
---|---|---
Client|[![](https://images.microbadger.com/badges/image/tpps88206/angular-go-grpc-example-client.svg)](https://microbadger.com/images/tpps88206/angular-go-grpc-example-client)|[![](https://images.microbadger.com/badges/version/tpps88206/angular-go-grpc-example-client.svg)](https://microbadger.com/images/tpps88206/angular-go-grpc-example-client)
Server|[![](https://images.microbadger.com/badges/image/tpps88206/angular-go-grpc-example-server.svg)](https://microbadger.com/images/tpps88206/angular-go-grpc-example-server)|[![](https://images.microbadger.com/badges/version/tpps88206/angular-go-grpc-example-server.svg)](https://microbadger.com/images/tpps88206/angular-go-grpc-example-server)## Development using
* Angular 8.0.0
* Go 1.12
* Protocol Buffers 3.7.1## Installation
Use Docker Compose to build client, server and proxy together.
docker-compose build
## Usage
Run client, server and proxy together.
docker-compose up
## Access pathClient site with Angular:
http://localhost:80/
Server site with Go:
http://localhost:50051/
Access the Envoy Proxy at:
http://localhost:8080/
## Protocol Buffers
If you need to modify .proto files, you can go to `./proto` and then you will need to compile them again.
cd proto
vim calc.proto
# After modify
cd ..
sh ./protoc.sh
## Client development modeThe Docker Image will build client with production mode. If you need to use development mode.
cd ./client
npm start
And the client access path ishttp://localhost:4200/
## Testing endpoints
If you want to try your server endpoint without client and proxy.
cd ./server/test
go run main.go## Reference
* https://github.com/kmturley/angular-nest-grpc
* https://github.com/easyCZ/grpc-web-hacker-news
* https://github.com/improbable-eng/grpc-web
* https://github.com/protocolbuffers/protobuf
* https://github.com/envoyproxy/envoy
* https://github.com/appleboy/docker-multi-stage-build
* https://grpc.io/blog/state-of-grpc-web/
* https://blog.envoyproxy.io/envoy-and-grpc-web-a-fresh-new-alternative-to-rest-6504ce7eb880
* http://www.servicemesher.com/envoy/start/sandboxes/grpc_bridge.html