index.ts 459 B

123456789101112131415161718
  1. import { bootstrap, JobQueueService } from '@vendure/core';
  2. import { devConfig } from './dev-config';
  3. /**
  4. * This bootstraps the dev server, used for testing Vendure during development.
  5. */
  6. bootstrap(devConfig)
  7. .then(app => {
  8. if (process.env.RUN_JOB_QUEUE === '1') {
  9. app.get(JobQueueService).start();
  10. }
  11. })
  12. .catch(err => {
  13. // tslint:disable-next-line
  14. console.log(err);
  15. process.exit(1);
  16. });