A gRPC service that scraps the specified URL and returns scrapped result and summary extracted by [Readability.js]
First, create an .env
file from .env.sample
.
Run url resolver from built docker images
$ docker pull cofacts/url-resolver
$ docker run --rm --env-file .env -p 4000:4000 cofacts/url-resolver
You can use gRPC clients like BloomRPC to access the service for testing purpose.
To access the gRPC service, you can see docker-test.js
for an example that uses @grpc/proto-loader
.
First, create an .env
file from .env.sample
. Fill in your env.
Install development dependencies
# After git clone
$ cd url-resolver
$ npm install
# Build js binary from proto files
$ npm run compile
Start dev server
$ npm start
After editing proto
files, run npm run compile
to generate corresponding Javascript binary.
Directly use docker to build image.
$ docker build -t cofacts/url-resolver:latest .