Webapplication Configuration Format
The root of the configuration is an <application>
tag.
Needed child elements are a <name>
tag with the name of the application as its content.
A <threadcount>
tag is optional and con contain the number of threads the application can use.
Each configuration should (no must) have a <directories>
tag which contains <public>
and <resource>
tags whose contents are directory names.
Public directories contains files which are directly accessible over a url.
Resource directories contains files which are used by the web application such as template files.
Each application should state one or more <server>
tags.
Each server configuration will open a web server at the specified port in the <port>
tag.
If you specify additional <certificate
> and <privatekey>
tags the web server will be a ssl server.
Each database your webapplication needs to use has to be specified using a <database>
tag.
Each database tag must have an <id>
child tag which contains the name of the database in the web application and a <type>
tag containing the type of the database.
The other child tags depends on the type of the database.
To specify a mysql database, the following child tags needs to be specified: <host>
, <name>
, <user>
and password
.
The only additional tag for a sqlite database is the <name>
tag.
The following example configuration shows all described tags in their context and exemplary contents. A similar configuration file is used for the example blog.
<application>
<name>blog</name>
<threadcount>8</threadcount>
<directories>
<public>public</public>
<resource>templates</resource>
</directories>
<server>
<port>9000</port>
</server>
<server>
<host>localhost</host>
<port>9090</port>
<certificate>server.crt</certificate>
<privatekey>server.key</privatekey>
</server>
<database>
<id>blog_sqlite</id>
<type>sqlite</type>
<name>blog.sqlite</name>
</database>
<database>
<id>blog_mysql</id>
<type>mysql</type>
<host>localhost</host>
<name>blog</name>
<user>blog</user>
<password>1234567890</password>
</database>
</application>