index-dev.ts 671 B

12345678910111213141516171819202122232425
  1. import { bootstrap } from './src';
  2. import { IntegerIdStrategy, StringIdStrategy } from './src/config/entity-id-strategy';
  3. /**
  4. * This bootstraps the dev server, used for testing Vendure during development.
  5. */
  6. bootstrap({
  7. port: 3000,
  8. cors: true,
  9. dbConnectionOptions: {
  10. type: 'mysql',
  11. entities: ['./src/**/entity/**/*.entity.ts'],
  12. synchronize: true,
  13. logging: true,
  14. host: '192.168.99.100',
  15. port: 3306,
  16. username: 'root',
  17. password: '',
  18. database: 'test',
  19. },
  20. // entityIdStrategy: new MadBastardIdStrategy(),
  21. }).catch(err => {
  22. // tslint:disable-next-line
  23. console.log(err);
  24. });