Configuration (config.ini
)
The behavior of the MIO Embedded Server is controlled via a simple config.ini
file placed in the same directory as the executable. If the file is missing, default values will be used.
Sample config.ini
serverport=9123
maxmessage=4096
password=public
serverpath=./db
contenttype=text/plain
charcode=utf8
Parameter Descriptions
Key | Type | Default | Description |
---|---|---|---|
serverport | Integer | 9123 | TCP port used by the server for incoming HTTP requests |
maxmessage | Integer | 4096 | Maximum allowed length of a POST message (in bytes) |
password | String | public | Authentication key required when sending data via POST |
serverpath | String | ./db | Base directory where data is stored, can be absolute or relative |
contenttype | String | text/plain | MIME type used when returning files via GET |
charcode | String | utf8 | Charset in the HTTP response header when serving files |
Storage Path
All POSTed data will be saved to:
<serverpath>/<token>/<file>
For example:
./db/device01/log.txt
If folders don't exist, they will be created automatically.
🛡️ Security Note
Although this server uses a password for POST authentication, it is a simple implementation meant for local or trusted network use only. It is not recommended for public internet exposure without additional protections (e.g. HTTPS reverse proxy).