From 682542ef73a95ae70e9f1dbae4167252ddb99a23 Mon Sep 17 00:00:00 2001 From: solufa Date: Wed, 20 Dec 2023 06:38:21 +0900 Subject: [PATCH] refactor: merge server/prisma/.env to server/.env --- .github/workflows/test.yml | 4 +--- README.md | 1 - server/.env.example | 2 ++ server/prisma/.env.example | 2 -- server/vite.config.ts | 2 +- 5 files changed, 4 insertions(+), 7 deletions(-) delete mode 100644 server/prisma/.env.example diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 52c38f2..f8783ae 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,7 +40,5 @@ jobs: - run: npm run generate - run: npm run lint - run: npm run typecheck - - run: | - cp client/.env.example client/.env - cp server/prisma/.env.example server/prisma/.env + - run: cp client/.env.example client/.env - run: npm test diff --git a/README.md b/README.md index 50a2e11..af50798 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,6 @@ $ npm i --prefix server $ cp client/.env.example client/.env $ cp server/.env.example server/.env $ cp docker/dev/.env.example docker/dev/.env -$ cp server/prisma/.env.example server/prisma/.env ``` ### ミドルウェアのセットアップ diff --git a/server/.env.example b/server/.env.example index 52ce8cc..361ebdd 100644 --- a/server/.env.example +++ b/server/.env.example @@ -9,3 +9,5 @@ S3_BUCKET=app S3_ACCESS_KEY=minio S3_SECRET_KEY=password S3_REGION=ap-northeast-1 +API_DATABASE_URL=postgresql://root:root@localhost:5432/app +TEST_DATABASE_URL=postgresql://root:root@localhost:5432/test diff --git a/server/prisma/.env.example b/server/prisma/.env.example deleted file mode 100644 index 8811af0..0000000 --- a/server/prisma/.env.example +++ /dev/null @@ -1,2 +0,0 @@ -API_DATABASE_URL=postgresql://root:root@localhost:5432/app -TEST_DATABASE_URL=postgresql://root:root@localhost:5432/test diff --git a/server/vite.config.ts b/server/vite.config.ts index dab792f..08f9608 100644 --- a/server/vite.config.ts +++ b/server/vite.config.ts @@ -2,7 +2,7 @@ import dotenv from 'dotenv'; import { defineConfig } from 'vite'; import tsconfigPaths from 'vite-tsconfig-paths'; -dotenv.config({ path: './prisma/.env' }); +dotenv.config(); export default defineConfig({ define: { 'import.meta.vitest': false },