Skip to main content
Deno 2 is finally here πŸŽ‰οΈ
Learn more
Module

x/redis/redis.ts>parseURL

πŸ¦• Redis client for Deno πŸ•
Very Popular
Latest
function parseURL
import { parseURL } from "https://deno.land/x/redis@v0.34.0/redis.ts";

Extract RedisConnectOptions from redis URL

Examples

Example 1

import { parseURL } from "./mod.ts";

parseURL("redis://foo:bar@localhost:6379/1"); // -> {hostname: "localhost", port: "6379", tls: false, db: 1, name: foo, password: bar}
parseURL("rediss://127.0.0.1:443/?db=2&password=bar"); // -> {hostname: "127.0.0.1", port: "443", tls: true, db: 2, name: undefined, password: bar}

Parameters

url: string