Skip to content
Brian Teague edited this page Mar 20, 2016 · 2 revisions

#Introduction The order of precedence is:

  1. Command-line

  2. Configuration file

  3. Built-in default

For the command line and configuation file, later arguments take precedence over earlier ones. #Command line

-clientdirectory <path>    path to client files directory (default: clotho3-web/dist)
-confidentialport <port>   HTTPS listening port (default: 8443)
-configfile <path>         path to configuration file (default: ~/.clothoconfig)
-dbhost <hostname>         database url hostname (default: localhost)
-dbname <name>             database name (default: clotho)
-dbport <port>             database url port (default: 27017)
-help                      print this message
-keystorepass <password>   SSL keystore password (default: )
-keystorepath <path>       SSL keystore path (default: ...)
-port <port>               HTTP listening port (default: 8080)

Any paths passed can be absolute (indicated by a preceding slash) or relative to the top of the clotho source tree.

##-port, -confidentialport Clotho listens on two ports - one for encrypted communication (HTTPS/WSS), and one for unencrypted communication (HTTP). Generally, the only communication over the HTTP port is redirecting browsers to the encrypted URL.

##-keystorepass, -keystorepath In order to make encrypted connections, Clotho needs access to a Java keystore with a X.509 certificate. Generating and signing SSL certificates is beyond the scope of this document;

For internal and testing purposes, you can generate a self-signed certificate with the Java keytool utility: keytool -keystore keystore -alias jetty -genkey -keyalg RSA

If you are running ClothoTestEnvironment, you don't need to set these options--a self-signed certificate is automatically generated.

##Log Level Log level is controlled by the system property 'loglevel', and is set slightly differently than other CLI options. To set a java system property on the command line, pass -D<property>="<value>" to the java executable. The valid values for the loglevel property are OFF, TRACE, DEBUG, INFO, WARN, and ERROR.

##Setting CLI arguments in an IDE ###Netbeans Open the Project Properties menu, and select the Actions category. Edit the Run project option by appending any arguments you want to set to the line in the Set Properties field starting with exec.args=.

To set system properties, prepend the property argument to the exec.args= line after the exec.args= part. Example:

exec.args=-Dloglevel="OFF" -classpath %classpath org.clothocad.core.ClothoStarter --keystorepath /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/security/cacerts --keystorepass changeit

Additionally, you can create custom actions (using the Add Custom.. dialogue) if you need to use different combinations of options frequently. ###Eclipse (Can someone who uses eclipse please fill out this section?)

#Configuration file The configuration file consists of key = value pairs, where every key corresponds to the command line options specified above. ##Example

# This is a comment
port = 8181
confidentialport = 8443
dbname = myclothodb
Clone this wiki locally