Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/redis/redis.ts>parseURL

🦕 Redis client for Deno 🍕
Very Popular
Latest
function parseURL
import { parseURL } from "https://deno.land/x/redis@v0.32.3/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