How to use the faastjs.faastLocal function in faastjs

To help you get started, we’ve selected a few faastjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github teppeis / duck / src / batch.ts View on Github external
export async function getFaastCompiler(
  config: DuckConfig
): Promise> {
  logger.info("Initializing batch mode");
  const batch = assertNonNullable(config.batch);
  const batchOptions = getBatchOptions(config);
  const m =
    batch === "aws"
      ? await faastAws(compilerFaastFunctions, batchOptions as AwsOptions)
      : batch === "local"
      ? await faastLocal(compilerFaastFunctions, batchOptions as LocalOptions)
      : null;
  if (!m) {
    throw new TypeError(`Unsupported batch mode: ${batch}`);
  }
  return m;
}