gemini-chat

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit b30d2092353c2c8f2165d771a629bbc718b49a93
parent 7918b0042ed851601b83dd42a0012d4f69cae4d0
Author: minerva-jupiter <ryouturn@gmail.com>
Date:   Sat, 27 Sep 2025 15:01:34 +0900

fix for github secret

Diffstat:
Mapp/api/chat/route.ts | 3+--
Mnext.config.ts | 14++++++++++++--
2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/app/api/chat/route.ts b/app/api/chat/route.ts @@ -2,8 +2,7 @@ import { GoogleGenAI } from "@google/genai"; import { NextRequest, NextResponse } from "next/server"; // 環境変数からAPIキーを取得 -// const apiKey = process.env.GEMINI_API_KEY; -const apiKey = import.meta.env.GEMINI_API_KEY; +const apiKey = process.env.GEMINI_API_KEY; if (!apiKey) { throw new Error("GEMINI_API_KEY is not set"); } diff --git a/next.config.ts b/next.config.ts @@ -1,7 +1,17 @@ -import type { NextConfig } from "next"; +import type { NextConfig } from 'next'; + +const repositoryName: string = 'nextjs'; +const isProduction: boolean = process.env.NODE_ENV === 'production'; const nextConfig: NextConfig = { - /* config options here */ + devIndicators: false, + output: 'export', // 静的書き出し + ...(isProduction // 本番環境ではbasePath、assetPrefixを変更 + ? { + basePath: `/${repositoryName}`, + assetPrefix: `/${repositoryName}/`, + } + : {}), }; export default nextConfig;