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,14 +40,14 @@ export async function setupEnvironmentVariables(
envContent += databaseUrlLine;
}
if (
options.database === "sqlite" &&
options.turso &&
!envContent.includes("TURSO_CONNECTION_URL")
) {
if (options.database === "sqlite") {
if (!envContent.includes("TURSO_CONNECTION_URL")) {
if (!options.turso) {
envContent += "\nTURSO_CONNECTION_URL=http://127.0.0.1:8080";
}
}
}
}
await fs.writeFile(envPath, envContent.trim());

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",
dbCredentials: {
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({
connection: {
url: process.env.TURSO_CONNECTION_URL!,
authToken: process.env.TURSO_AUTH_TOKEN!,
authToken: process.env.TURSO_AUTH_TOKEN,
},
// logger: true,
});