Skip to main content

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

KeyTypeDefaultDescription
serverportInteger9123TCP port used by the server for incoming HTTP requests
maxmessageInteger4096Maximum allowed length of a POST message (in bytes)
passwordStringpublicAuthentication key required when sending data via POST
serverpathString./dbBase directory where data is stored, can be absolute or relative
contenttypeStringtext/plainMIME type used when returning files via GET
charcodeStringutf8Charset 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).