launchbase 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/launchbase.js +13 -10
  2. package/package.json +1 -1
package/bin/launchbase.js CHANGED
@@ -7,7 +7,7 @@ const crypto = require('crypto');
7
7
  const fs = require('fs-extra');
8
8
  const { execSync, spawn } = require('child_process');
9
9
 
10
- const VERSION = '1.0.8';
10
+ const VERSION = '1.0.9';
11
11
  const program = new Command();
12
12
 
13
13
  function findAvailablePort(startPort = 5432, maxAttempts = 100) {
@@ -538,18 +538,20 @@ program
538
538
  env: { ...process.env, PORT: apiPort.toString() }
539
539
  });
540
540
 
541
- // Start frontend after delay if included
541
+ // Start frontend if included
542
+ let frontend = null;
542
543
  if (options.template) {
543
544
  const frontendPath = path.join(targetDir, 'frontend');
544
545
  if (await fs.pathExists(frontendPath)) {
545
- setTimeout(() => {
546
- const frontend = spawn('npm', ['run', 'dev'], {
547
- cwd: frontendPath,
548
- stdio: 'inherit',
549
- shell: true,
550
- env: { ...process.env, VITE_API_URL: `http://localhost:${apiPort}`, PORT: frontendPort.toString() }
551
- });
552
- }, 5000);
546
+ console.log('šŸŽØ Starting frontend development server...\n');
547
+ frontend = spawn('npm', ['run', 'dev'], {
548
+ cwd: frontendPath,
549
+ stdio: 'inherit',
550
+ shell: true,
551
+ env: { ...process.env, VITE_API_URL: `http://localhost:${apiPort}`, PORT: frontendPort.toString() }
552
+ });
553
+ } else {
554
+ console.log('āš ļø Frontend folder not found at ' + frontendPath + '\n');
553
555
  }
554
556
  }
555
557
 
@@ -557,6 +559,7 @@ program
557
559
  process.on('SIGINT', () => {
558
560
  console.log('\n\nšŸ‘‹ Shutting down...');
559
561
  backend.kill();
562
+ if (frontend) frontend.kill();
560
563
  process.exit(0);
561
564
  });
562
565
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "launchbase",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Generate production-ready NestJS backends with authentication, multi-tenancy, billing, and deployment in minutes",
5
5
  "author": "LaunchBase",
6
6
  "keywords": [