mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
add mongoose orm to the stack builder (#191)
This commit is contained in:
committed by
GitHub
parent
946f3eb421
commit
437cf9a45a
@@ -62,6 +62,12 @@ export async function setupDatabase(config: ProjectConfig): Promise<void> {
|
||||
projectDir: serverDir,
|
||||
});
|
||||
}
|
||||
} else if (orm === "mongoose") {
|
||||
await addPackageDependency({
|
||||
dependencies: ["mongoose"],
|
||||
devDependencies: [],
|
||||
projectDir: serverDir,
|
||||
});
|
||||
}
|
||||
|
||||
if (database === "sqlite" && dbSetup === "turso") {
|
||||
|
||||
@@ -367,6 +367,11 @@ export async function setupAuthTemplate(
|
||||
PKG_ROOT,
|
||||
`templates/auth/server/db/prisma/${db}`,
|
||||
);
|
||||
} else if (orm === "mongoose") {
|
||||
authDbSrc = path.join(
|
||||
PKG_ROOT,
|
||||
`templates/auth/server/db/mongoose/${db}`,
|
||||
)
|
||||
}
|
||||
if (authDbSrc && (await fs.pathExists(authDbSrc))) {
|
||||
await processAndCopyFiles("**/*", authDbSrc, serverAppDir, context);
|
||||
|
||||
Reference in New Issue
Block a user