cofacts / url-resolver

Automatically resolves the given URL into useful data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 .

About

Automatically resolves the given URL into useful data

License:MIT License


Languages

Language:JavaScript 98.1%Language:Dockerfile 1.8%Language:Shell 0.0%