Skip to content

Latest commit

 

History

History
51 lines (33 loc) · 1.32 KB

README.md

File metadata and controls

51 lines (33 loc) · 1.32 KB

Cofacts URL Resolver

Build Status Coverage Status

A gRPC service that scraps the specified URL and returns scrapped result and summary extracted by [Readability.js]

Usage

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.

Development

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.

Build

Directly use docker to build image.

$ docker build -t cofacts/url-resolver:latest .