==BaseX JAX-RX Server==
;Launch the JAX-RX server(deprecated from <font color='red'>Version 6.8</font>):
<pre>
> basexjaxrx
| <code>admin</code>
| <code>-Uadmin</code>
|- valign="top"
| <code>-z</code>
| Do not generate [[Logging|log files]].
|
|}
==BaseX HTTP Server==
;Launch the HTTP server (introduced with <font color='red'>Version 6.8</font>):
<pre>
> basexhttp
BaseX [Server]
Server was started.
2011-01-02 03:04:05.600:INFO::Logging to STDERR via org.mortbay.log.StdErrLog
2011-01-02 03:04:05.700:INFO::jetty-6.1.26
2011-01-02 03:04:05.800:INFO::Started SocketConnector@0.0.0.0:8984</pre>
Available command-line options can be listed with the <code>-h</code> flag:
<pre>
> basexhttp -h
BaseX [HTTP]
Usage: basexhttp [-cdeJhnpPsSUWz] [stop]
stop Stop existing server
-c Start in client/server mode
-d Activate debugging mode
-e<num> Set event port
-h<num> Set HTTP server port
-n<name> Set server (host) name
-p<num> Set database server port
-P<pass> Specify user password
-s Start database as service
-U<name> Specify user name
-W Deactivate WebDAV
-z Suppress logging
</pre>
The options have the following meaning:
{| class="wikitable"
|- valign="top"
! width='70' | Flag
! Description
! Default
! width='145' | Examples
|- valign="top"
| <code>stop</code>
| Stop an existing server instance.
|
|
|- valign="top"
| <code>-c</code>
| Starts the server in client mode, communicating with the server instance of BaseX.
| <code></code>
| <code></code>
|- valign="top"
| <code>-d</code>
| Turn on debugging. Debugging information is output to ''standard error''.
|
|
|- valign="top"
| <code>-e<num></code>
| Specify the port on which the server will send events to clients.
| <code>1985</code>
| <code>-e9998</code>
|- valign="top"
| <code>-h<num></code>
| The port on which the HTTP server will be addressable. This port is e.g. specified in the HTTP URLs.
| <code>8984</code>
| <code>-h9999</code>
|- valign="top"
| <code>-n<name></code>
| The server name on which the server is running.
| <code>localhost</code>
| <code>-nserver.basex.org</code>
|- valign="top"
| <code>-p<num></code>
| The port on which the BaseX Server will be addressable.
| <code>1984</code>
| <code>-p9998</code>
|- valign="top"
| <code>-P<pass></code>
| The user password, which will be used by the HTTP services to communicate with the BaseX Server. ''Warning'': when the password is specified on command-line, it may be visible to others.
| <code>admin</code>
| <code>-Uadmin -Padmin</code>
|- valign="top"
| <code>-R</code>
| Deactivates the REST service.
|
|
|- valign="top"
| <code>-s</code>
| Start the server as service (i.e., in the background).
|
|
|- valign="top"
| <code>-U<name></code>
| The user name, which will be used by the HTTP services to communicate with the BaseX Server.
| <code>admin</code>
| <code>-Uadmin</code>
|- valign="top"
| <code>-W</code>
| Deactivates the WebDAV service.
|
|
|- valign="top"
| <code>-z</code>