TerrabaseDB supports custom configuration files to let users customize the functioning of TDB. Arguably, TDB has one of the simplest configuration files around.
An example configuration
A configuration file is a TOML file, which looks like:
host = "127.0.0.1"
port = 2003
noart = false
This is the default configuration used by TDB when you don't specify a configuration file. Let's understand what each of the keys mean:
host: This is the IP address to which you want the database server to bind to. It can be any valid IPv4 or IPv6 address, as a quoted string
port: This is the port to which you want TDB to bind to
noart(OPTIONAL): This is an optional argument and is recommended for secure environments where displaying terminal artwork might cause problems
Using a configuration file
To use a configuration file:
- Create it! We recommend you to name it as
tdb.tomlfor easy identification
- Start the database server with:
tdb -c /path/to/your/file.toml
- Done 🎉
That's all that's there for using configuration files!
If you're using a custom host/port, then you can bind
tsh to a custom host/port by starting
tsh [HOST] [PORT]