Jump to top

functions

interface

The Firebase Cloud Functions service is available for the default app, a given app or a specified region.

The default functions region for all apps is us-central1.

Example 1

Get the functions instance for the default app:

const functionsForDefaultApp = firebase.functions();
Example 2

Get the functions instance for a secondary app:

const otherApp = firebase.app('otherApp');
const functionsForOtherApp = firebase.functions(otherApp);
Example 3

Get the functions instance for a specific functions region:

const defaultApp = firebase.app();
const functionsForRegion = defaultApp.functions('europe-west1');

const otherApp = firebase.app('otherApp');
const functionsForOtherAppRegion = otherApp.functions('europe-west1');

Methods

httpsCallable

</>

Returns a reference to the callable HTTPS trigger with the given name.

httpsCallable(name: string, options?: HttpsCallableOptions): HttpsCallable<, >;

httpsCallableFromUrl

</>

Returns a reference to the callable HTTPS trigger with the specified url.

httpsCallableFromUrl(url: string, options?: HttpsCallableOptions): HttpsCallable<, >;

useEmulator

</>

Changes this instance to point to a Cloud Functions emulator running locally.

useEmulator(host: string, port: number): void;

useFunctionsEmulator

</>

Changes this instance to point to a Cloud Functions emulator running locally.

useFunctionsEmulator(origin: string): void;

Statics

HttpsErrorCode

</>

Uppercase + underscored variables of FunctionsErrorCode

functions.HttpsErrorCode: HttpsErrorCode;