NAME

dta-cab-http-server.perl - standalone HTTP server for DTA::CAB queries

SYNOPSIS

 dta-cab-http-server.perl [OPTIONS...]

 General Options:
  -help                           ##-- show short usage summary
  -man                            ##-- show longer help message
  -version                        ##-- show version & exit
  -verbose LEVEL                  ##-- really just an alias for -log-level=LEVEL

 Server Configuration Options:
  -config PLFILE                  ##-- load server config from PLFILE
  -tcp , -unix                    ##-- set socket type (default=-tcp)
  -bind   HOST                    ##-- override TCP host to bind or relay (default=all)
  -port   PORT                    ##-- override TCP port to bind or relay (default=8088)
  -unix-socket PATH               ##-- override UNIX socket path to bind (default=none)
  -unix-user USER                 ##-- override UNIX socket ownershiip (default=current)
  -unix-group GROUP               ##-- override UNIX socket group (default=current)
  -unix-perms PERMS               ##-- override UNIX socket permissions (default=0666)

 Daemon Mode Options:
  -pidfile PIDFILE                ##-- save server PID to PIDFILE
  -daemon , -nodaemon             ##-- do/don't fork() a server subprocess
  -force  , -noforce              ##-- do/don't overwrite existing PIDFILE (default=don't)

 Logging Options:                 ##-- see Log::Log4perl(3pm)
  -log-level LEVEL                ##-- set minimum log level (internal config only)
  -log-file LOGFILE               ##-- log to file LOGFILE (default: none)
  -log-stderr , -nolog-stderr     ##-- do/don't log to stderr (default: do)
  -log-rotate , -no-rotate        ##-- do/don't auto-rotate logs (default: if available)
  -log-syslog , -no-syslog        ##-- do/don't log to syslog (default: don't)
  -log-config L4PFILE             ##-- override log4perl config file
  -log-watch SECONDS_OR_SIGNAL    ##-- override: watch L4PFILE (delay SECONDS or on SIGNAL)
  -nolog-watch                    ##-- override: don't watch L4PFILE
  -log-option OPT=VALUE           ##-- set any logging option (e.g. -log-option twlevel=trace)

DESCRIPTION

dta-cab-http-server.perl is a command-line utility for starting a standalone HTTP server to perform DTA::CAB token-, sentence-, and/or document-analysis using the DTA::CAB::Server::HTTP module.

See dta-cab-http-client.perl(1) for a command-line client using the DTA::CAB::Client::HTTP module.

OPTIONS AND ARGUMENTS

General Options

-help

Display a short help message and exit.

-man

Display a longer help message and exit.

-version

Display program and module version information and exit.

-verbose LEVEL

Alias for "-log-level LEVEL".

Server Configuration Options

-config PLFILE

Load server configuration from PLFILE, which should be a perl source file parseable by DTA::CAB::Persistent::loadFile() as a DTA::CAB::Server::HTTP object.

-bind HOST

Override host on which to bind server socket. Default is to bind on all interfaces of the current host.

-port PORT

Override port number to which to bind the server socket. Default is whatever DTA::CAB::Server::HTTP defaults to (usually 8088).

Daemon Mode Options

-daemon , -nodaemon

Do/don't fork() a server subprocess (default: don't). If running in daemon mode, the program should simply spawn a single server subprocess and exit, reporting the PID of the child process.

Useful for starting persistent servers from system-wide init scripts. See also "-pidfile FILE".

-pidfile FILE

Writes PID of the server process to FILE before running the server. Useful for system init scripts.

Logging Options

The DTA::CAB family of modules uses the Log::Log4perl logging mechanism. See Log::Log4perl(3pm) for details on the general logging mechanism.

-log-level LEVEL

Set minimum log level. Has no effect if you also specify "-log-config". Known levels: (trace|debug|info|warn|error|fatal).

-log-config L4PFILE

User log4perl config file L4PFILE. Default behavior uses the log configuration string returned by DTA::CAB::Logger->defaultLogConf().

-log-watch , -nowatch

Do/don't watch log4perl config file (default=don't). Only sensible if you also specify "-log-config".

ACKNOWLEDGEMENTS

Perl by Larry Wall.

RPC::XML by Randy J. Ray.

AUTHOR

Bryan Jurish <moocow@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2010-2019 by Bryan Jurish. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.24.1 or, at your option, any later version of Perl 5 you may have available.

SEE ALSO

dta-cab-analyze.perl(1), dta-cab-convert.perl(1), dta-cab-http-server.perl(1), dta-cab-http-client.perl(1), dta-cab-xmlrpc-server.perl(1), dta-cab-xmlrpc-client.perl(1), DTA::CAB(3pm), HTTP::Daemon(3pm), perl(1), ...