Skip to content

Commit

Permalink
feat(npm-scripts): init db automatically after installation (#413)
Browse files Browse the repository at this point in the history
Closes EWC-368
  • Loading branch information
mchepelev authored Dec 5, 2018
1 parent 5369b05 commit a77bea3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion scripts/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,15 @@ try {
fs.unlinkSync(installationVariablesFile);
} catch (e) {
console.log('no previous version')
}
}

//init db
const options = {
env: {
'NODE_ENV': 'production',
"PATH": process.env.PATH
},
stdio: [process.stdin, process.stdout, process.stderr]
};

execSync('node ./src/main.js init', options);

0 comments on commit a77bea3

Please sign in to comment.