gemini-chat

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

commit c0e19df854bddd9daf275dc1e3a82188a6e6e827
parent a100119cab78af44a52969d0fb5d6fc5dc8e9d86
Author: minerva-jupiter <ryouturn@gmail.com>
Date:   Sat, 27 Sep 2025 14:56:35 +0900

env to import.meta.env.*

Diffstat:
Mapp/api/chat/route.ts | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/api/chat/route.ts b/app/api/chat/route.ts @@ -2,7 +2,8 @@ import { GoogleGenAI } from "@google/genai"; import { NextRequest, NextResponse } from "next/server"; // 環境変数からAPIキーを取得 -const apiKey = process.env.GEMINI_API_KEY; +// const apiKey = process.env.GEMINI_API_KEY; +const apiKey = import.meta.env.GEMINI_API_KEY; if (!apiKey) { throw new Error("GEMINI_API_KEY is not set"); }