Skip to content

Commit

Permalink
fix: scopedAppName for env (#1942)
Browse files Browse the repository at this point in the history
  • Loading branch information
AbiramK authored Jul 10, 2024
1 parent 494c459 commit 300ce09
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cli/src/installers/envVars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const envVariablesInstaller: Installer = ({
projectDir,
packages,
databaseProvider,
projectName,
scopedAppName,
}) => {
const usingAuth = packages?.nextAuth.inUse;
const usingPrisma = packages?.prisma.inUse;
Expand All @@ -22,7 +22,7 @@ export const envVariablesInstaller: Installer = ({
!!usingPrisma,
!!usingDrizzle,
databaseProvider,
projectName
scopedAppName
);

let envFile = "";
Expand Down Expand Up @@ -60,7 +60,7 @@ const getEnvContent = (
usingPrisma: boolean,
usingDrizzle: boolean,
databaseProvider: DatabaseProvider,
projectName: string
scopedAppName: string
) => {
let content = `
# When adding additional environment variables, the schema in "/src/env.js"
Expand Down Expand Up @@ -88,9 +88,9 @@ DATABASE_URL='mysql://YOUR_MYSQL_URL_HERE?ssl={"rejectUnauthorized":true}'`;
DATABASE_URL='mysql://YOUR_MYSQL_URL_HERE?sslaccept=strict'`;
}
} else if (databaseProvider === "mysql") {
content += `DATABASE_URL="mysql://root:password@localhost:3306/${projectName}"`;
content += `DATABASE_URL="mysql://root:password@localhost:3306/${scopedAppName}"`;
} else if (databaseProvider === "postgres") {
content += `DATABASE_URL="postgresql://postgres:password@localhost:5432/${projectName}"`;
content += `DATABASE_URL="postgresql://postgres:password@localhost:5432/${scopedAppName}"`;
} else if (databaseProvider === "sqlite") {
content += 'DATABASE_URL="file:./db.sqlite"';
}
Expand Down

0 comments on commit 300ce09

Please sign in to comment.