@shelter/shelv-runner
v0.0.6
Published
The library that processes Shelv tasks on Shelv workers, as well as a docker container with the correct environment to run the tasks.
Downloads
3
Readme
shelv-runner
The library that processes Shelv tasks on Shelv workers, as well as a docker container with the correct environment to run the tasks.
The docker container has shelv-runner installed globally using yarn.
Usage
CLI
shelv-runner input.json output.json
This will read a task from input.json
and output the result to output.json
.
Library
import { runTask, ShelvTask } from 'shelv-runner';
(async () => {
const task: ShelvTask = {
url: 'http://google.com/'
};
const result = await runTask(task);
console.log(result);
})();
Docker Container
The docker container has the shelv CLI set as the entrypoint, so can be run like so:
docker run $IMAGE_NAME input.json output.json