Skip to content

Commit

Permalink
feat(create): Improve config defaults
Browse files Browse the repository at this point in the history
Enables the latest features for the DefaultJobQueuePlugin and DefaultSearchPlugin, and exposes
the cookie secret setting, which closes #1147
  • Loading branch information
michaelbromley committed Oct 12, 2021
1 parent 5981619 commit e2f799c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/create/templates/vendure-config.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ const path = require('path');
identifier: '{{{ escapeSingle superadminIdentifier }}}',
password: '{{{ escapeSingle superadminPassword }}}',
},
cookieOptions: {
secret: process.env.COOKIE_SECRET || 'cookie-secret',
},
},
dbConnectionOptions: {
type: '{{ dbType }}',
Expand Down Expand Up @@ -75,8 +78,8 @@ const path = require('path');
route: 'assets',
assetUploadDir: path.join(__dirname, '../static/assets'),
}),
DefaultJobQueuePlugin,
DefaultSearchPlugin,
DefaultJobQueuePlugin.init({ useDatabaseForBuffer: true }),
DefaultSearchPlugin.init({ bufferUpdates: false, indexStockStatus: true }),
EmailPlugin.init({
devMode: true,
outputPath: path.join(__dirname, '../static/email/test-emails'),
Expand Down

0 comments on commit e2f799c

Please sign in to comment.