https://github.com/oleksiikhr/go-node-grpc-dom-parser
A small example of a project to test gRPC technology
https://github.com/oleksiikhr/go-node-grpc-dom-parser
fasthttp grpc grpc-go grpc-node grpc-typescript playwright typescript
Last synced: about 1 month ago
JSON representation
A small example of a project to test gRPC technology
- Host: GitHub
- URL: https://github.com/oleksiikhr/go-node-grpc-dom-parser
- Owner: oleksiikhr
- License: mit
- Created: 2021-03-25T12:47:34.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-31T22:36:46.000Z (about 5 years ago)
- Last Synced: 2025-01-23T01:31:22.522Z (over 1 year ago)
- Topics: fasthttp, grpc, grpc-go, grpc-node, grpc-typescript, playwright, typescript
- Language: JavaScript
- Homepage:
- Size: 106 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Go Node gRPC DOM Parser
> A small example of a project to test gPRC technology.
A running `Go` server that accepts requests from the Internet and communicates with` Node` using [`gRPC`](https://grpc.io/).
## Development
- Launch docker containers.
```shell
$ docker-compose up -d
```
- Execute any request from [API] (# api), for example:
`http://localhost:8081/image?url=https://news.ycombinator.com/`
## Scripts
Generating **go/node** code from proto files:
```shell
# Go -> go/services/proto
$ sh ./go/utils/grpc.sh
# Node -> node/src/grpc/proto
$ sh ./node/utils/grpc.sh
```
## API
- Get site image: `/image?url=`.
`http://localhost:8081/image?url=https://news.ycombinator.com/`
- Get site HTML: `/html?url=`.
`http://localhost:8081/html?url=https://news.ycombinator.com/`
## Testing
- Run `docker-compose` containers
- Run `go test .` in **go** folder
## Technologies
- [gPRC](https://grpc.io/)
- [Docker](https://www.docker.com/)
**Node**
- [@grpc/grpc-js](https://www.npmjs.com/package/@grpc/grpc-js) - Pure JavaScript gRPC Client
- [microsoft/playwright](https://github.com/microsoft/playwright) - Playwright to automate Chromium, Firefox and WebKit with a single API
- [agreatfool/grpc_tools_node_protoc_ts](https://github.com/agreatfool/grpc_tools_node_protoc_ts) - Generate TypeScript d.ts definitions for generated js files
- [remy/nodemon](https://github.com/remy/nodemon) - Live reload
- [microsoft/TypeScript](https://github.com/microsoft/TypeScript) - TypeScript extends JavaScript by adding types
**Go**
- [gRPC-Go](https://google.golang.org/grpc) - The Go implementation of gRPC
- [cosmtrek/air](https://github.com/cosmtrek/air) - Live reload
- [valyala/fasthttp](https://github.com/valyala/fasthttp) - Fast HTTP implementation
## License
[MIT](https://opensource.org/licenses/MIT)