-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from dannylindquist/patch-1
fix redis port
- Loading branch information
Showing
1 changed file
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,20 +31,20 @@ The primary Redis URL is: | |
|
||
```bash | ||
# format | ||
redis://x:<password>@<primary-region>.<appname>.internal:5432 | ||
redis://x:<password>@<primary-region>.<appname>.internal:6379 | ||
|
||
# example in scl | ||
redis://x:[email protected]:5432 | ||
redis://x:[email protected]:6379 | ||
``` | ||
|
||
Read replicas are similar, but using a different region prefix (the `$FLY_REGION` environment variable is handy here). | ||
|
||
To generate a local read replica with Node.js, you might do something like: | ||
|
||
```javascript | ||
const primary = new URL("redis://x:[email protected]:5432") | ||
const primary = new URL("redis://x:[email protected]:6379") | ||
const replica = new URL(primary) | ||
replica.hostname = `${process.env['FLY_REGION']}.my-redis-app.internal` | ||
replica.toString() | ||
// 'redis://x:[email protected]:5432' | ||
``` | ||
// 'redis://x:[email protected]:6379' | ||
``` |