index-worker.ts 469 B

123456789101112131415
  1. import { bootstrapWorker } from '@vendure/core';
  2. import { devConfig } from './dev-config';
  3. // https://github.com/vendure-ecommerce/vendure/issues/152
  4. // fix race condition when modifying DB
  5. devConfig.dbConnectionOptions = { ...devConfig.dbConnectionOptions, synchronize: false };
  6. bootstrapWorker(devConfig)
  7. .then(worker => worker.startJobQueue())
  8. .catch(err => {
  9. // tslint:disable-next-line
  10. console.log(err);
  11. process.exit(1);
  12. });