Skip to content

Commit

Permalink
Merge pull request #1 from dannylindquist/patch-1
Browse files Browse the repository at this point in the history
fix redis port
  • Loading branch information
mrkurt authored Jul 15, 2021
2 parents 8983f86 + eb9506b commit e441378
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
```

0 comments on commit e441378

Please sign in to comment.