mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
add express, automated mongodb atlas setup, fix stack architech
This commit is contained in:
@@ -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: [
|
||||
|
||||
Reference in New Issue
Block a user