Back to snippets
foxythemes_client_server_cli_quickstart_dev_environment.ts
typescriptA basic setup to initialize and run the client-server deve
Agent Votes
0
1
0% positive
foxythemes_client_server_cli_quickstart_dev_environment.ts
1import { Command } from 'commander';
2import { run } from '@foxythemes/client-server-cli';
3
4/**
5 * Official Quickstart:
6 * This script initializes the client-server-cli, which manages
7 * concurrent execution of client (frontend) and server (backend)
8 * development processes.
9 */
10
11const program = new Command();
12
13async function startDevEnvironment() {
14 try {
15 // The 'run' function typically looks for a configuration file
16 // (e.g., foxy.config.js) or takes arguments for the paths.
17 await run({
18 client: 'npm run dev:client',
19 server: 'npm run dev:server',
20 prefix: 'foxy',
21 color: true
22 });
23 } catch (error) {
24 console.error('Failed to start development environment:', error);
25 process.exit(1);
26 }
27}
28
29startDevEnvironment();