-
Notifications
You must be signed in to change notification settings - Fork 1
Config XML
Adrian O'Grady edited this page Nov 11, 2020
·
9 revisions
Config.xml can be used to configure Itokawa's settings such as listening port. The config will be used by both the main server application and the cli application.
By default, config.xml can be found in ~/.itokawa/config.xml
. If the file doesn't exist, default settings will be used.
<config>
<application>
<log>
<level>INFO</level>
</log>
</application>
<server>
<port>80</port>
<publish>
<ngrok>
<region>eu</region>
</ngrok>
</publish>
</server>
</config>
Application log configuration.
Key | Values | Default | Description |
---|---|---|---|
level | DEBUG, INFO, DISPLAY, WARN, ERROR | DISPLAY | Log output level |
Enabled serial port debug logs if this section is defined. Debug snap shots are saved to ~/.itokawa/serialport.snapshot.txt
.
Key | Values | Default | Description |
---|---|---|---|
snapshotsize | 1+ | 10 | Number of serial port messages to log in the event of an error |
Settings for the server application.
Key | Values | Default | Description |
---|---|---|---|
port | 1-65534 | 8080 | TCP port to listen on |
Shell commands for server operations.
Key | Values | Default | Description |
---|---|---|---|
restart | shell command | sudo shutdown -r now | Command to restart server |
shutdown | shell command | sudo shutdown -h now | Command to shut down server |
If the ngrok publishing section is present, the server will be publicly accessible using ngrok. Keys are mapped to options as defined on the ngrok npm package docs. The example config would be defined as:
<config>
<server>
<publish>
<ngrok>
<proto>http</proto>
<!-- addr>The port is automatically set by Itokawa</addr -->
<auth>user:pwd</auth>
<subdomain>alex</subdomain>
<authtoken>12345</authtoken>
<region>us</region>
<configPath>~/git/project/ngrok.yml</configPath>
</ngrok>
</publish>
</server>
</config>