Skip to content

ukeeper/ukeeper-readability

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ukeeper-readability build Coverage Status

Running instructions

docker-compose up will leave you with working ukeeper-readability service (both API and frontend) running on http://localhost:8080.

Configuration

Command line Environment Default Description
address UKEEPER_ADDRESS all interfaces web server listening address
port UKEEPER_PORT 8080 web server port
mongo_uri MONGO_URI none MongoDB connection string, required
frontend_dir FRONTEND_DIR /srv/web directory with frontend files
token TOKEN none token for /content/v1/parser endpoint auth
mongo-delay MONGO_DELAY 0 mongo initial delay
mongo-db MONGO_DB ureadability mongo database name
creds CREDS none credentials for protected calls (POST, DELETE /rules)
dbg DEBUG false debug mode

API

GET /api/content/v1/parser?token=secret&url=http://aa.com/blah - extract content (emulate Readability API parse call)
POST /api/v1/extract {url: http://aa.com/blah}  - extract content

Development

Running tests

To run the full test suite, you need MongoDB running without authorisation on port 27017. To start such Mongo instance, check comments in docker-compose.yaml file and run Mongo according to them.

Command to run full test suite would be:

ENABLE_MONGO_TESTS=true go test ./...