Skip to content

Commit

Permalink
use redis port
Browse files Browse the repository at this point in the history
Replaces postgres port 5432 with redis 6379
  • Loading branch information
dannylindquist authored Jul 15, 2021
1 parent 8983f86 commit eb9506b
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 eb9506b

Please sign in to comment.