Chapter 2. Monkey Configuration
2.1. Indented Configuration Mode
Monkey HTTP Daemon implements an innovator configuration mode called 'Indented Configuration'. This new mode aims to provide a clean way to force the system administrator to keep a legible configuration along all configuration files. People with basic knowledge of Python programming language is aware of the indented language mode, we have implemented the same great idea for configuration. If your configuration file is not indented properly, Monkey will stop working.
The configuration handle three main actors: sections, entries and comments. Entries has multiple entries and you can define as many comments as you want, but always following the Monkey indentation rules. Main sections are defining at beginning of the new line, and their entries are indented under the section declaration, take a look to the following example:
[SERVER]
# Port :
# ------
# Port is the number of the door in which Monkey will be listened through
# connections and petitions. This number can have any value between 1 and
# 65535. Whatever specified number less than or equal to 1024, only will
# be able to be established as a connection door if the user posesses
# privledges of Root.
Port 2001The below example, shows a section called SERVER which is defined inside brackets. In the next line exists a couple of commented lines and are indented, so ANY COMMENT inside a section MUST BE INDENTED. Also any entry as the key 'Port' and value '2001' are INDENTED TOO. A section ends when a new line contains some text NOT INDENTED.
The indentation level is defined by the system administrator, Monkey Team suggest to use an indentation level of four spaces. You are able to define your own indentation level. The first indentation level found will be used to parse the whole file in question.