faast.js

faast.js

  • Docs
  • API
  • Community
  • GitHub
  • Blog

faastjs > faast

faast() function

The main entry point for faast with any provider and only common options.

Signature:

export declare function faast<M extends object>(provider: Provider, fmodule: M, options?: CommonOptions): Promise<FaastModule<M>>;

Parameters

ParameterTypeDescription
providerProviderOne of "aws", "google", or "local". See Provider.
fmoduleMA module imported with import * as X from "Y";. Using require also works but loses type information.
optionsCommonOptions(Optional) See CommonOptions.

Returns:

Promise<FaastModule<M>>

See FaastModule.

Remarks

Example of usage:

import { faast } from "faastjs";
import * as mod from "./path/to/module";
(async () => {
    const faastModule = await faast("aws", mod);
    try {
        const result = await faastModule.functions.func("arg");
    } finally {
        await faastModule.cleanup();
    }
})();
  • faast() function
  • Parameters
  • Remarks
faast.js
Docs
IntroductionAPI ReferenceContributingExamples
Community
DiscordTwitterStack Overflowfaast.js
More
BlogUser Showcase
Copyright © 2023 Andy Chou