Skip to content

oleksiikhr/go-node-grpc-dom-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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