@webiny/wcp
v5.43.6
Published
A set of Webiny Control Panel (WCP)-related utilities.
Readme
@webiny/wcp
A set of Webiny Control Panel (WCP)-related utilities.
Table of Contents
Installation
npm install --save @webiny/wcpOr if you prefer yarn:
yarn add @webiny/wcpOverview
The @webiny/wcp package contains essential Webiny Control Panel (WCP)-related utilities.
Examples
| Example | Description | | ------- | ----------- | | Retrieve WCP URLs | Shows how to retrieve WCP API and app URLs. |
Reference
Functions
getWcpAppUrl
export declare const getWcpAppUrl: (path?: string | undefined) => string;Returns WCP app URL. The default URL can be overridden via the WCP_APP_URL environment variable.
import { getWcpAppUrl } from "@webiny/wcp";
console.log(getWcpAppUrl()); // Returns "https://d3mudimnmgk2a9.cloudfront.net".getWcpApiUrl
export declare const getWcpApiUrl: (path?: string | undefined) => string;Returns WCP API URL. The default URL can be overridden via the WCP_API_URL environment variable.
import { getWcpApiUrl } from "@webiny/wcp";
console.log(getWcpApiUrl()); // Returns "https://d3mudimnmgk2a9.cloudfront.net".getWcpGqlApiUrl
export declare const getWcpGqlApiUrl: (path?: string | undefined) => string;Returns WCP GraphQL API URL.
import { getWcpGqlApiUrl } from "@webiny/wcp";
console.log(getWcpGqlApiUrl()); // Returns "https://d3mudimnmgk2a9.cloudfront.net/graphql".