create config if it's not there

This commit is contained in:
Pablo Fernandez 2024-01-31 13:33:01 +00:00
parent a9814fd150
commit 529f68360d

View File

@ -1,8 +1,12 @@
const { execSync, spawn } = require('child_process'); const { execSync, spawn } = require('child_process');
const fs = require('fs');
try { try {
console.log(`Running migrations`); console.log(`Running migrations`);
execSync(`mkdir config`); // check if config folder exists
if (!fs.existsSync('./config')) {
execSync(`mkdir config`);
}
execSync('npm run prisma:migrate'); execSync('npm run prisma:migrate');
} catch (error) { } catch (error) {
console.log(error); console.log(error);