Skip to content

Commit e4f950c

Browse files
add .gitignore in template
1 parent bcac7e2 commit e4f950c

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

.changeset/poor-seas-deny.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-better-t-stack": patch
3+
---
4+
5+
fix env when turso setup is off

apps/cli/src/helpers/env-setup.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ export async function setupEnvironmentVariables(
4040
envContent += databaseUrlLine;
4141
}
4242

43-
if (
44-
options.database === "sqlite" &&
45-
options.turso &&
46-
!envContent.includes("TURSO_CONNECTION_URL")
47-
) {
48-
envContent += "\nTURSO_CONNECTION_URL=http://127.0.0.1:8080";
43+
if (options.database === "sqlite") {
44+
if (!envContent.includes("TURSO_CONNECTION_URL")) {
45+
if (!options.turso) {
46+
envContent += "\nTURSO_CONNECTION_URL=http://127.0.0.1:8080";
47+
}
48+
}
4949
}
5050
}
5151

apps/cli/template/base/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/node_modules/
2+
.turbo

apps/cli/template/with-drizzle-sqlite/packages/server/drizzle.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ export default defineConfig({
66
dialect: "turso",
77
dbCredentials: {
88
url: process.env.TURSO_CONNECTION_URL!,
9-
authToken: process.env.TURSO_AUTH_TOKEN!,
9+
authToken: process.env.TURSO_AUTH_TOKEN,
1010
},
1111
});

apps/cli/template/with-drizzle-sqlite/packages/server/src/db/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { drizzle } from "drizzle-orm/libsql";
33
export const db = drizzle({
44
connection: {
55
url: process.env.TURSO_CONNECTION_URL!,
6-
authToken: process.env.TURSO_AUTH_TOKEN!,
6+
authToken: process.env.TURSO_AUTH_TOKEN,
77
},
88
// logger: true,
99
});

0 commit comments

Comments
 (0)