add .gitignore in template

This commit is contained in:
Aman Varshney
2025-03-20 15:34:15 +05:30
parent bcac7e25fa
commit e4f950c689
5 changed files with 15 additions and 8 deletions

View File

@@ -0,0 +1,5 @@
---
"create-better-t-stack": patch
---
fix env when turso setup is off

View File

@@ -40,12 +40,12 @@ export async function setupEnvironmentVariables(
envContent += databaseUrlLine; envContent += databaseUrlLine;
} }
if ( if (options.database === "sqlite") {
options.database === "sqlite" && if (!envContent.includes("TURSO_CONNECTION_URL")) {
options.turso && if (!options.turso) {
!envContent.includes("TURSO_CONNECTION_URL") envContent += "\nTURSO_CONNECTION_URL=http://127.0.0.1:8080";
) { }
envContent += "\nTURSO_CONNECTION_URL=http://127.0.0.1:8080"; }
} }
} }

2
apps/cli/template/base/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/node_modules/
.turbo

View File

@@ -6,6 +6,6 @@ export default defineConfig({
dialect: "turso", dialect: "turso",
dbCredentials: { dbCredentials: {
url: process.env.TURSO_CONNECTION_URL!, url: process.env.TURSO_CONNECTION_URL!,
authToken: process.env.TURSO_AUTH_TOKEN!, authToken: process.env.TURSO_AUTH_TOKEN,
}, },
}); });

View File

@@ -3,7 +3,7 @@ import { drizzle } from "drizzle-orm/libsql";
export const db = drizzle({ export const db = drizzle({
connection: { connection: {
url: process.env.TURSO_CONNECTION_URL!, url: process.env.TURSO_CONNECTION_URL!,
authToken: process.env.TURSO_AUTH_TOKEN!, authToken: process.env.TURSO_AUTH_TOKEN,
}, },
// logger: true, // logger: true,
}); });