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
Parameter |
Type |
Description |
---|---|---|
provider |
One of | |
fmodule |
M |
A module imported with |
options |
(Optional) See CommonOptions. |
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();
}
})();