core
core copied to clipboard
REST API wrapper for the processor
Description
This pull request provides the REST API wrapper for the processor. Instead of "one-shot mode", the processor now can be started as a server. There are 2 ways to start the processor:
1. Use processor name. This is the recommended way to start the Pythonic processor as a server.
# Syntax
<processor-name> --address=IP:PORT:MONGO_URL
# Example
$ ocrd-dummy --address=0.0.0.0:80:mongodb://localhost:27017
2. Use ocrd tool. This approach is for non-Python processor.
# Syntax
ocrd processing-server <processor-name> --address=IP:PORT:MONGO_URL
# Example
$ ocrd processing-server ocrd-dummy --address=0.0.0.0:80:mongodb://localhost:27017
Options
-
processor-name: executable name of the processor -
--address: it has 3 parts, separated by colon,IP:PORT:MONGO_URL, where-
IP: the IP address that the server should listen on. -
PORT: the port that the server should listen on. -
MONGO_URL: the full connection string to a running Mongo database instance.
-