Worker
Worker is a simple HTTP server that accepts FQL queries, executes them and returns their results.
Quick start
The Worker is shipped with dedicated Docker image that contains headless Google Chrome, so feel free to run queries using cdp
driver:
docker run -p 8080:8080 -it montferret/worker
Alternatively, if you want to use your own version of Chrome, you can run the Worker locally:
make
And then just make a POST request:
Usage
Endpoints
[POST] /
- Executes a given query. The payload must be an object with required "text" and optional "params" fields.
[GET] /version
- Returns a version of Chrome and Ferret.
[GET] /health
- Health check endpoint (for Kubernetes, e.g.).
Run commands
-chrome-ip string
Google Chrome remote IP address (default "127.0.0.1")
-chrome-port uint
Google Chrome remote debugging port (default 9222)
-help
show this list
-port uint
port to listen (default 8080)
-version
show REPL version