diff --git a/scripts/postinstall.js b/scripts/postinstall.js index 8a74c5f02..a5bf6e22e 100644 --- a/scripts/postinstall.js +++ b/scripts/postinstall.js @@ -73,4 +73,15 @@ try { fs.unlinkSync(installationVariablesFile); } catch (e) { console.log('no previous version') -} \ No newline at end of file +} + +//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); \ No newline at end of file