Skip to content

Commit e44cc16

Browse files
committed
Update README.md
1 parent ef92666 commit e44cc16

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ local redis_connector = require "resty.redis.connector"
1212
local rc = redis_connector.new()
1313

1414
local redis, err = rc:connect{ url = "redis://PASSWORD@127.0.0.1:6379/2" }
15+
16+
-- or...
17+
18+
local redis, err = rc:connect{
19+
host = "127.0.0.1",
20+
port = 6379,
21+
db = 2,
22+
password = "PASSWORD",
23+
}
24+
1525
if not redis then
1626
ngx.log(ngx.ERR, err)
1727
end

0 commit comments

Comments
 (0)