add express, automated mongodb atlas setup, fix stack architech

This commit is contained in:
Aman Varshney
2025-04-07 21:32:22 +05:30
parent c6c73fce76
commit 2cf01d155b
38 changed files with 902 additions and 393 deletions

View File

@@ -1,15 +1,21 @@
import { cancel, isCancel, select } from "@clack/prompts";
import { cancel, isCancel, log, select } from "@clack/prompts";
import pc from "picocolors";
import { DEFAULT_CONFIG } from "../constants";
import type { ProjectOrm } from "../types";
import type { ProjectDatabase, ProjectOrm } from "../types";
export async function getORMChoice(
orm: ProjectOrm | undefined,
hasDatabase: boolean,
database?: ProjectDatabase,
): Promise<ProjectOrm> {
if (!hasDatabase) return "none";
if (orm !== undefined) return orm;
if (database === "mongodb") {
log.info("Only Prisma is supported with MongoDB.");
return "prisma";
}
const response = await select<ProjectOrm>({
message: "Select ORM",
options: [