Installation and configuration
Prerequisite: Node.js, version 14.x or newer. |
---|
Installation
To install fauna-shell
globally and create a default, YAML-formatted
configuration file, enter:
npm install -g fauna-shell
Configuration
For Linux, macOS, and other UNIX-like systems, the configuration file is
located in the $HOME/.fauna-shell
directory.
For Windows systems, the configuration file is located in the
%userprofile%\.fauna-shell
directory.
You can configure fauna-shell
for one or more connection endpoints.
An endpoint defines the domain, secret, and other properties needed to
query a Fauna instance.
In the following example, the default endpoint is defined in the first line as
db2
and there is a corresponding db2
endpoint configuration.
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
[db2]
domain=private.example
port=8443
scheme=https
secret=MY_ORGANIZATION_SECRET
An endpoint entry begins with a [<endpoint>]
header, which is the
name or alias for the endpoint, and is followed by the endpoint configuration
properties.
If a property is duplicated, fauna-shell
uses the last definition.
Global properties
Configuration key | Description |
---|---|
|
(Optional) Default endpoint alias. If
|
Endpoint properties
Property | Required | Description |
---|---|---|
|
No |
Hostname of this endpoint Fauna instance. |
|
No |
Connection scheme. One of:
|
|
No |
UNIX port number of this endpoint Fauna instance. |
|
Yes |
Database secret. |
|
Yes |
File name that has queries to run using the |
|
Yes |
Query to use with the |
You can add more properties to differentiate between endpoints, but they are ignored.
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!