Support URL/URI option in options
See original GitHub issuePer the documentation, we can create a new Redis instance via:
// Connect to 127.0.0.1:6380, db 4, using password "authpassword":
new Redis('redis://:authpassword@127.0.0.1:6380/4')
At the same time there does not appear to be an equivalent solution of passing a URL if we provide options.
Am I missing this option? If not, could this be added in a future version?
Rereading the docs, I see we can do:
new Redis(url, options)
though it would still be good to allow the url to be specified in the options, so we can directly copy a configuration into the constructor.
Using ioredis 4.9.3.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
what are URL options? - Stack Overflow
There is currently only one option you can include: universalLinksOnly . Universal links are URLs that apps signed up to handle, ...
Read more >OPTIONS - HTTP - MDN Web Docs
The HTTP OPTIONS method requests permitted communication options for a given URL or server. A client can specify a URL with this method, ......
Read more >application(_:open:options:) | Apple Developer Documentation
application(_:open:options:) Asks the delegate to open a resource specified by a URL, and provides a dictionary of launch options.
Read more >About targets for Dynamic Search Ads - Google Ads Help
You can target pages with URLs that contain a certain piece of text, called a token. In a URL, a token is surrounded...
Read more >The 7 best URL shorteners of 2022 - Zapier
To help you find the right URL shorteners for most people, I tested more than 35 different options. These are the best—and what...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It would be for consistency at the very least, since currently both port and host are both available in the argument and the options. It would also allow to have a configuration of the form (which may be copied straight from a config file):
Yes, that may be. Currently the options resolver follows the rule same as
Object.assign()
, so the latter one take precedence.