Skip to content

Commit 90e3024

Browse files
committed
move env vars to .env.local
1 parent 52fc1f5 commit 90e3024

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/packageInstallationUtils.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -213,15 +213,15 @@ export function addVsCodeSdks(projectPath, packageManager) {
213213

214214
export function updateEnvPrisma(projectPath) {
215215
fs.appendFileSync(
216-
path.join(projectPath, '.env'),
216+
path.join(projectPath, '.env.local'),
217217
`
218218
# Environment variables declared in this file are automatically made available to Prisma.
219219
# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema
220220
# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB.
221221
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings
222222
223223
# Example connection string for mysql, update to match your used database and database user
224-
DATABASE_URL="mysql://webstart:webstart@localhost:3306/webstart"
224+
DATABASE_URL=mysql://webstart:webstart@localhost:3306/webstart
225225
226226
`,
227227
function (err) {
@@ -233,7 +233,7 @@ DATABASE_URL="mysql://webstart:webstart@localhost:3306/webstart"
233233

234234
export function updateEnvNextAuth(projectPath) {
235235
fs.appendFileSync(
236-
path.join(projectPath, '.env'),
236+
path.join(projectPath, '.env.local'),
237237
`
238238
# Next Auth Variables
239239
GITHUB_ID=<enter github id>

src/projectCreationUtils.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,7 @@ export function initNodeYarn(pathToParentDirectory, pathToProject) {
5858

5959
export function addEnvFile(projectPath) {
6060
fs.writeFileSync(
61-
path.join(projectPath, '.env'),
62-
`# General Variables
63-
64-
NEXT_BACKEND_URL=http://127.0.0.1:3000
65-
66-
`,
61+
path.join(projectPath, '.env.local'), '',
6762
function (err) {
6863
if (err) {
6964
return console.log(err)

0 commit comments

Comments
 (0)