fix the constants of ENV
This commit is contained in:
parent
1ac51ee7a4
commit
52fd0b2e80
2 changed files with 2 additions and 4 deletions
|
@ -13,8 +13,6 @@ export async function GET(request: Request, { params }: { params: { id: string }
|
||||||
const fileContents = await fs.readFile(filePath, "utf8");
|
const fileContents = await fs.readFile(filePath, "utf8");
|
||||||
const newsData = JSON.parse(fileContents);
|
const newsData = JSON.parse(fileContents);
|
||||||
|
|
||||||
// You could use VALIDATED_ENV.API_URL here if you needed to make any external API calls
|
|
||||||
|
|
||||||
return NextResponse.json(newsData);
|
return NextResponse.json(newsData);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error reading news data:", error);
|
console.error("Error reading news data:", error);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
export const ENV = {
|
export const ENV = {
|
||||||
WS_URL: process.env.NEXT_PUBLIC_WS_URL || "ws://localhost:3001",
|
WS_URL: process.env.NEXT_PUBLIC_WS_URL || "ws://localhost:3000",
|
||||||
API_URL: process.env.NEXT_PUBLIC_API_URL || "http://localhost:3001/api",
|
API_URL: process.env.NEXT_PUBLIC_API_URL || "http://localhost:3000/api",
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export type ENV = typeof ENV;
|
export type ENV = typeof ENV;
|
||||||
|
|
Loading…
Add table
Reference in a new issue