opensaas
Version:
Create fully bundled SaaS application (Backend & Frontend) using an interactive CLI
20 lines (17 loc) • 565 B
text/typescript
import shell from 'shelljs';
import prompts from 'prompts';
export async function addService(args: string[]): Promise<void> {
const [name] = args;
const question: prompts.PromptObject = {
type: 'select',
name: 'service',
message: 'Choose db',
choices: [
{ title: 'PostgreSQL', value: 'config-service' },
{ title: 'MongoDB', value: 'metrics-service' },
],
};
const { service } = await prompts(question);
shell.exec(`cp -r ./backend/services/${service} ./backend/services/${name}`, { silent: true });
}