Skip to content
infra-ts is early and moving fast.npm
infra-ts
Esc
navigateopen⌘Jpreview
On this page

Dub

Provision Dub short-link domains, tags, and links as typed infra-ts entities.

Dub link-shortening domains, tags, and links.

  • Import: import { DubDomain, DubLink } from "infra-ts/dub";
  • Credentials: DUB_API_KEY.

Entities

Entity Provisions Key options Env outputs
DubDomain A short domain slug? (defaults to name)
DubTag A tag color?
DubLink A short link url · domain? · key? DUB_SHORT_LINK

Example

import { defineInfra } from "infra-ts";
import { DubDomain, DubLink } from "infra-ts/dub";

const domain = new DubDomain({ name: "go.acme.com" });
const link = new DubLink({
	name: "launch",
	url: "https://acme.com/launch",
	domain: "go.acme.com",
});

export default defineInfra({ entities: [domain, link] });

Was this page helpful?