Skip to content

Latest commit

 

History

History
67 lines (41 loc) · 1.81 KB

File metadata and controls

67 lines (41 loc) · 1.81 KB

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.

Development

  • Launch docker containers.
$ 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:

# 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=<website-url>.

http://localhost:8081/image?url=https://news.ycombinator.com/

  • Get site HTML: /html?url=<website-url>.

http://localhost:8081/html?url=https://news.ycombinator.com/

Testing

  • Run docker-compose containers
  • Run go test . in go folder

Technologies

Node

Go

License

MIT