index-worker.ts 510 B

1234567891011121314151617
  1. import { bootstrapWorker, JobQueueService } 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(app => {
  8. app.get(JobQueueService).start();
  9. })
  10. .catch(err => {
  11. // tslint:disable-next-line
  12. console.log(err);
  13. process.exit(1);
  14. });