Skip to main content

BootstrapWorker

bootstrapWorker

Bootstraps a Vendure worker. Resolves to a VendureWorker object containing a reference to the underlying NestJs standalone application as well as convenience methods for starting the job queue and health check server.

Read more about the Vendure Worker.

Example

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

bootstrapWorker(config)
.then(worker => worker.startJobQueue())
.then(worker => worker.startHealthCheckServer({ port: 3020 }))
.catch(err => {
console.log(err);
});
Signature
function bootstrapWorker(userConfig: Partial<VendureConfig>): Promise<VendureWorker>

Parameters

userConfig

parameter
Partial<VendureConfig>