Configuration
The configuration for fauna-shell
is an
INI-format file that stores the
configuration for endpoints. An endpoint specifies the domain, secret,
and other options that can be used to run queries against any Fauna
instance within the database associated with the secret.
For Linux, macOS, and other UNIX-like systems, the configuration file
is located in $HOME/.fauna-shell
. For Windows, the configuration
file is located in %userprofile%\.fauna-shell
.
Example configuration
A configuration file that defines multiple endpoints that would connect to a variety of Fauna instances might look like:
default=db2
[localhost]
domain=127.0.0.1
port=8443
scheme=http
secret=secret
[cloud]
domain=db.fauna.com
scheme=https
secret=fnADS@PxN@2CE@n7z@kDa4_p6Z@fIBaZm@Qt@bYT
graphqlHost=graphql.fauna.com
[db2]
domain=private.example
port=8443
scheme=https
secret=MY_ORGANIZATION_SECRET
Summary of INI configuration:
-
Each section, identified by the square brackets, provides the name for an endpoint — called an endpoint alias — and lists the properties that provide the endpoint’s configuration.
-
A property uses the format
name=value
, which specifies the name of a property and its configured value. -
When a property name is re-used in a section, the last definition is used.
Global properties
Configuration key | Description |
---|---|
|
Optional - Specifies the default endpoint to use when one is not
specified with |
Endpoint-specific properties
Property | Description |
---|---|
|
Optional - The hostname of this endpoint’s Fauna instance. Defaults
to |
|
Optional - One of |
|
Optional - The UNIX port number of this endpoint’s Fauna instance. Defaults to 443. |
|
The secret for a specific database. |
|
Optional - The hostname of this endpoint’s GraphQL API service.
Defaults to |
The list of properties is not strictly enforced; additional
properties can be included to help differentiate between
endpoints, but these properties have no effect in
fauna-shell .
|
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!