Skip to content
Lenz edited this page Aug 29, 2018 · 3 revisions

OGER command: serve

OGER Version: 1.0

Start a server with a simple RESTful API like so:

oger serve -s settings.ini

Usage

Use GET or POST requests to process individual articles. The RESTful API supports specifying input and output format.

Submitting a plain GET request to the port on which the server is listening returns an HTML page with a form for sending requests through the browser. Any request with an unkown location will yield a usage message, which describes the expected URL structure.

See also the documentation of the public REST API.

Config

The server's host (IP) and port can be specified through the command-line options -i/--host and -p/--port, respectively. The -d/--debug flag activates showing debugging information in the served responses.

Through the -s/--settings option, settings files can be specified (as described here). Parameters can be overridden individually through the -c/--config option, which takes a key/value pair as arguments and can be repeated (described here).

Please note that the shortcut options (like -p/--postfilter) are not available for the serve command; all parameters must be specified in settings files or through the -c/--config meta-option.

Also note that it doesn't make much sense to specify input/output parameters on server start-up, since loading and exporting is handled by the API's methods based on incoming requests. Instead, it is useful to configure termlist and postfiltering parameters.

Clone this wiki locally