index.ts 523 B

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