doc: Server invocation and configuration
* doc/server.texi (Liza Server): Add information on starting the server. (Server Configuration): Add subsection.master
parent
c92e979000
commit
5f8fb2fcc5
|
@ -39,31 +39,63 @@ An example script to start the server is shown in @ref{f:server-start}.
|
||||||
use @srcrefjs{server/daemon,DevDaemon},
|
use @srcrefjs{server/daemon,DevDaemon},
|
||||||
which uses a dummy encryption service.}
|
which uses a dummy encryption service.}
|
||||||
|
|
||||||
|
To start the server,
|
||||||
|
invoke @srcref{bin/server}.
|
||||||
|
You may also invoke @srcref{bin/server.js} directly using Node.js,
|
||||||
|
but the use of @srcref{bin/server} is recommended,
|
||||||
|
as it uses the Node.js executable determined at configure-time,
|
||||||
|
along with any command-line options required for Liza@tie{}Server
|
||||||
|
to function correctly.
|
||||||
|
Additional options can be provided to Node.js using the
|
||||||
|
@var{NODE_FLAGS} environment variable,
|
||||||
|
which will be @emph{appended} to the configure-time flags.
|
||||||
|
This environment variable is @emph{not} escaped or quoted,
|
||||||
|
so be mindful of word expansion.
|
||||||
|
|
||||||
@float Figure, f:server-start
|
@float Figure, f:server-start
|
||||||
@example
|
@example
|
||||||
const @{ Daemon @} = require( 'liza' ).server.daemon;
|
$ bin/server -c path/to/config.json
|
||||||
const port = 8080;
|
|
||||||
const log_priority = 10;
|
|
||||||
|
|
||||||
Daemon( port, log_priority ).start();
|
# providing additional options to node
|
||||||
|
$ NODE_FLAGS=--debug bin/server -c path/to/config.json
|
||||||
@end example
|
@end example
|
||||||
@caption{Starting the server daemon}
|
@caption{Starting the Liza Server}
|
||||||
@end float
|
@end float
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@cindex HTTP Server
|
@cindex HTTP Server
|
||||||
The HTTP server is managed by
|
The HTTP server is managed by
|
||||||
@srcrefjs{server/daemon,http_server}.
|
@srcrefjs{server/daemon,http_server}.
|
||||||
|
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
* Requests:: Handling HTTP requests.
|
* Configuration:Server Configuration. Server configuration.
|
||||||
* Posting Data:: Handling step saves and other posts.
|
* Requests:: Handling HTTP requests.
|
||||||
* Server-Side Data API Calls:: Accessing external resources on the server.
|
* Posting Data:: Handling step saves and other posts.
|
||||||
* Encryption Service:: Managing sensitive data.
|
* Server-Side Data API Calls:: Accessing external resources on the server.
|
||||||
|
* Encryption Service:: Managing sensitive data.
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@node Server Configuration
|
||||||
|
@section Configuration
|
||||||
|
@helpwanted{}
|
||||||
|
|
||||||
|
@cindex Configuration
|
||||||
|
Liza is migrating to actual configuration file in place of environment
|
||||||
|
variables.
|
||||||
|
If no configuration is explicitly specified,
|
||||||
|
it uses @srcrefraw{conf/vanilla-server.json}.
|
||||||
|
|
||||||
|
Configuration loading is handled by @srcrefjs{conf,ConfLoader}.
|
||||||
|
The configuration store @srcrefjs{conf,ConfStore} is asyncrhonous,
|
||||||
|
so loading configuration from any external system is supported.@footnote{
|
||||||
|
Provided that you write the code to load from that system,
|
||||||
|
that is.}
|
||||||
|
|
||||||
|
|
||||||
@node Requests
|
@node Requests
|
||||||
@section HTTP Requests
|
@section HTTP Requests
|
||||||
@helpwanted{}
|
@helpwanted{}
|
||||||
|
|
Loading…
Reference in New Issue