-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-app.js
More file actions
29 lines (21 loc) · 856 Bytes
/
start-app.js
File metadata and controls
29 lines (21 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const { spawn } = require('child_process');
console.log('Starting FinTrack Application...');
const backend = spawn('npm', ['start'], { cwd: './backend', shell: true, stdio: 'inherit' });
backend.on('error', (err) => {
console.error('Failed to start backend:', err);
});
backend.on('close', (code) => {
console.log(`Backend process exited with code ${code}`);
});
setTimeout(() => {
const frontend = spawn('npm', ['start'], { cwd: './frontend', shell: true, stdio: 'inherit' });
frontend.on('error', (err) => {
console.error('Failed to start frontend:', err);
});
frontend.on('close', (code) => {
console.log(`Frontend process exited with code ${code}`);
});
console.log('FinTrack application is starting up!');
console.log('Backend: http://localhost:5001/api');
console.log('Frontend: http://localhost:3000');
}, 6000);