BootstrapWorker

bootstrapWorker

bootstrapWorker

Package: @vendure/core File: bootstrap.ts

Bootstraps the Vendure worker. Resolves to an object containing a reference to the underlying NestJs standalone application as well as a function used to start listening for and processing jobs in the job queue.

Read more about the Vendure Worker.

Example

import { bootstrapWorker } from '@vendure/core';
import { config } from './vendure-config';

bootstrapWorker(config)
  .then(worker => worker.startJobQueue())
  .catch(err => {
    console.log(err);
  });

Signature

function bootstrapWorker(userConfig: Partial<VendureConfig>): Promise<{ app: INestApplicationContext; startJobQueue: () => Promise<void> }>

Parameters

userConfig

parameter
type:
Partial<VendureConfig>