mirror of
https://github.com/kind-0/nsecbunkerd.git
synced 2025-03-17 13:22:54 +01:00
updates
This commit is contained in:
parent
ff5387b778
commit
87217f9a3f
22
scripts/start.ts
Normal file
22
scripts/start.ts
Normal file
@ -0,0 +1,22 @@
|
||||
import { execSync, spawn } from "child_process";
|
||||
|
||||
try {
|
||||
console.log(`Running migrations`);
|
||||
// check if config folder exists
|
||||
if (!fs.existsSync('./config')) {
|
||||
execSync(`mkdir config`);
|
||||
}
|
||||
execSync('npm run prisma:migrate');
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
// Handle any potential migration errors here
|
||||
}
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
const childProcess = spawn('node', ['./dist/index.js', ...args], {
|
||||
stdio: 'inherit',
|
||||
});
|
||||
|
||||
childProcess.on('exit', (code) => {
|
||||
process.exit(code);
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user