mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
feat(cli): prisma + workers, prisma + turso, planetscale (postgres/mysql) support (#567)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import alchemy from "alchemy";
|
||||
{{#if (eq webDeploy "alchemy")}}
|
||||
{{#if (includes frontend "next")}}
|
||||
import { Next } from "alchemy/cloudflare";
|
||||
import { Nextjs } from "alchemy/cloudflare";
|
||||
{{else if (includes frontend "nuxt")}}
|
||||
import { Nuxt } from "alchemy/cloudflare";
|
||||
{{else if (includes frontend "svelte")}}
|
||||
@@ -44,13 +44,17 @@ await Exec("db-generate", {
|
||||
});
|
||||
|
||||
const db = await D1Database("database", {
|
||||
{{#if (eq orm "prisma")}}
|
||||
migrationsDir: "apps/server/prisma/migrations",
|
||||
{{else if (eq orm "drizzle")}}
|
||||
migrationsDir: "apps/server/src/db/migrations",
|
||||
{{/if}}
|
||||
});
|
||||
{{/if}}
|
||||
|
||||
{{#if (eq webDeploy "alchemy")}}
|
||||
{{#if (includes frontend "next")}}
|
||||
export const web = await Next("web", {
|
||||
export const web = await Nextjs("web", {
|
||||
{{#if (eq serverDeploy "alchemy")}}cwd: "apps/web",{{/if}}
|
||||
bindings: {
|
||||
{{#if (eq backend "convex")}}
|
||||
|
||||
@@ -27,7 +27,12 @@
|
||||
"database_name": "YOUR_DB_NAME",
|
||||
"database_id": "YOUR_DB_ID",
|
||||
"preview_database_id": "local-test-db",
|
||||
{{#if (eq orm "drizzle")}}
|
||||
"migrations_dir": "./src/db/migrations"
|
||||
{{/if}}
|
||||
{{#if (eq orm "prisma")}}
|
||||
"migrations_dir": "./prisma/migrations"
|
||||
{{/if}}
|
||||
}
|
||||
]
|
||||
{{/if}}
|
||||
|
||||
Reference in New Issue
Block a user