-
Notifications
You must be signed in to change notification settings - Fork 5
Configuring
Stumble instances are configured by way of a simple JavaScript object.
For users of
stumble-cli
, the configuration object should be contained in a JSON file. It is passed to the command line application with the --config (-c) flag.
For direct users of
stumble, the configuration object can be written directly in JS, or included (with require) from a JSON file.
It is passed as the first and only argument to the Stumble constructor.
The rest of the document will be an outline followed by explanations of each key & value in the configuration object. Basic understanding of valid JSON types and structure will help out here, but it’s pretty straight forward.
See
example.json for additional syntax hints.
This section of the wiki shows the outline of the configuration object.
This section explains individual parts of the configuration object.
Note that:
-
All property names (keys) are case sensitive.
extensionsis not the same asExtensions, and Stumble will make no attempts to spot these mistakes for you. -
Valid JSON requires double quotes around all property names, but JS does not. This document will generally use JSON syntax in examples, since it is valid in both contexts.
-
Three dots
…indicate that data has been omitted for brevity. Take this as a fill in the blanks kind of hint. -
Any time a path is involved, unless it is absolute, it is resolved relative to the current working directory responsible for executing whatever ultimately starts Stumble. Care must be taken to ensure that your paths are correct. When in doubt, use absolute paths.
-
Type:
String -
Required
-
Example:
"operator": "!"
The operator is the string value that commands should be prefixed with, differentiating them from regular messages.
echo a regular message, ignored by Stumble. !echo a command, and it's message body.
-
Type:
Object -
Required
-
Example:
"mumble": { … }
The mumble object contains properties pertaining to connecting to the target mumble server, and providing identification for Stumble.
-
Type:
String -
Required
-
Example:
"server": "127.0.0.1"
The server is a string value representing the address of the Mumble server to connect to. mumble:// is prefixed internally, so you should not include it in the address.
-
Type:
Number(Integer) -
Required
-
Example:
"port": 64738
The port is an integer value specifying the port of the Mumble server to connect to.
-
Type:
String -
Required
-
Example:
"username": "A Stumble Bot"
The username is a string value representing the user name Stumble will identify as, in the Mumble server. It must adhere to the user name rules set by the server.
-
Type:
String -
Optional-ish
-
Example:
"password": "super secret !"
The password is a string value representing the password Stumble will use to access the Mumble server.
If the server has no password, this should be set as the empty string ("").
The password is plain text. To avoid having plain text passwords floating around:
-
create a
keyandcert -
use the password to connect to the Mumble server once
-
register Stumble in the server
Afterwards this field can be omitted.
-
Type:
String -
Optional
-
Example:
"key": "id/key.pem"
The key is a string value representing the path to an SSL key file.
Stumble is created with love.