Skip to content

Commit

Permalink
chore(docs): Update default proxy URL in CLI docs (#1271)
Browse files Browse the repository at this point in the history
Someone [reported some
confusion](https://discord.com/channels/933657521581858818/933657523049885698/1240288588906762350)
with respect to the documented default proxy URL - this fix makes it
slightly more verbose but hopefully removes any ambiguity.

Technically all parts of the proxy uri are set by environment variables,
but the database name in particular is the only one that has a "dynamic"
default set by the project name - not sure if it's worth expanding the
CLI description to mention that the proxy URL really defaults to:
```
postgresql://{ELECTRIC_DATABASE_USER}:{ELECTRIC_DATABASE_PASSWORD}@{ELECTRIC_DATABASE_HOST}:{ELECTRIC_DATABASE_PORT}/{ELECTRIC_DATABASE_NAME}
```
feels like it would be _too_ verbose.
  • Loading branch information
msfstef authored May 16, 2024
1 parent 437e84f commit 2096133
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ All arguments are optional. The principal ones are described below:
| Argument or Env var | Value | Description |
|----------------------|--------------|------------------------------------------|
| <span className="no-wrap">`--service`</span><br/><span className="no-wrap">`-s`</span><br/>`ELECTRIC_SERVICE` |`<url>` | Provides the url to connect to the [Electric sync service](./service.md).<br /> Defaults to `http://localhost:5133`. |
| <span className="no-wrap">`--proxy`</span><br/><span className="no-wrap">`-p`</span><br/>`ELECTRIC_PROXY` | `<url>` | Provides the url to connect to Electric's database proxy.<br /> Defaults to <span class="break-all">`postgresql://postgres:proxy_password@localhost:65432/electric`</span>. |
| <span className="no-wrap">`--proxy`</span><br/><span className="no-wrap">`-p`</span><br/>`ELECTRIC_PROXY` | `<url>` | Provides the url to connect to Electric's database proxy.<br /> Defaults to <span class="break-all">`postgresql://postgres:proxy_password@localhost:65432/your_db_name`</span>, where `your_db_name` is the name provided through [`ELECTRIC_DATABASE_NAME`](#electric_database_name). |
| <span className="no-wrap">`--client-path`</span><br /><span className="no-wrap">`-o`</span><br />`ELECTRIC_CLIENT_PATH` | `<path>` | Specifies the output location for the generated client.<br /> Defaults to `./src/generated/client` |
| <span className="no-wrap">`--watch`</span><br /><span className="no-wrap">`-w`</span> | `<pollingInterval>` | Run the generator in watch mode. Accepts an optional polling interval (in milliseconds) which defines how often to poll Electric for database migrations.<br /> The default polling interval is 1000ms. |
| <span className="no-wrap">`--with-migrations`</span> | `<command>` | Specify a command to run migrations against an ephemeral postgres in order to create a client. [See details below](#local-only-first-mode) |
Expand Down

0 comments on commit 2096133

Please sign in to comment.