UNPKG

@fly/cdn

Version:
30 lines (29 loc) 860 B
/** * @module Backends */ import { ProxyFunction } from "../proxy"; import { SubdomainOptions } from "./subdomain_service"; /** * Heroku application configuration. */ export interface HerokuOptions { /** Heroku App name: <appName>.herokuapp.com */ appName: string; /** If Heroku is configured with a custom domain name, use it. */ hostname?: string; } /** * Creates a `fetch` like function for proxying requests to a Heroku app. * Example: * ```typescript * import { heroku } from "./src/backends"; * const backend = heroku({ * appName: "example" * }); * ``` * @param config Heroku app information. Accepts appName as a string. */ export declare function heroku(options: HerokuOptions | string): ProxyFunction<SubdomainOptions>; export declare namespace heroku { var normalizeOptions: (input: unknown) => SubdomainOptions; }