Skip to content

Commit

Permalink
Fix Randomly does not show accept/show images for catalog #390
Browse files Browse the repository at this point in the history
  • Loading branch information
treoden committed Nov 16, 2023
1 parent 5bdaa34 commit 17193a2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/evershop/bin/lib/startUp.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const http = require('http');
const config = require('config');
const { Handler } = require('@evershop/evershop/src/lib/middleware/Handler');
const spawn = require('cross-spawn');
const path = require('path');
Expand Down Expand Up @@ -56,14 +57,19 @@ module.exports.start = async function start(cb) {
server.listen(port);

// Spawn the child process to manage events
const currentConfig = config.util.toObject(config);
const args = [
path.resolve(__dirname, '../../src/lib/event/event-manager.js')
];
if (isDevelopmentMode() || process.argv.includes('--debug')) {
args.push('--debug');
}
const child = spawn('node', args, {
stdio: 'inherit'
stdio: 'inherit',
env: {
...process.env,
NODE_CONFIG: JSON.stringify(currentConfig)
}
});

child.on('error', (err) => {
Expand Down

0 comments on commit 17193a2

Please sign in to comment.