first commit
This commit is contained in:
16
src/pages/api/debug-env.ts
Normal file
16
src/pages/api/debug-env.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import type { NextApiRequest, NextApiResponse } from 'next';
|
||||
|
||||
export default function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
// Проверяем только публичные переменные для безопасности
|
||||
const envVars = {
|
||||
NEXT_PUBLIC_MAINTENANCE_MODE: process.env.NEXT_PUBLIC_MAINTENANCE_MODE,
|
||||
NEXT_PUBLIC_CMS_GRAPHQL_URL: process.env.NEXT_PUBLIC_CMS_GRAPHQL_URL,
|
||||
NODE_ENV: process.env.NODE_ENV,
|
||||
};
|
||||
|
||||
res.status(200).json({
|
||||
message: 'Environment Variables Debug',
|
||||
env: envVars,
|
||||
timestamp: new Date().toISOString(),
|
||||
});
|
||||
}
|
13
src/pages/api/hello.ts
Normal file
13
src/pages/api/hello.ts
Normal file
@ -0,0 +1,13 @@
|
||||
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
|
||||
type Data = {
|
||||
name: string;
|
||||
};
|
||||
|
||||
export default function handler(
|
||||
req: NextApiRequest,
|
||||
res: NextApiResponse<Data>,
|
||||
) {
|
||||
res.status(200).json({ name: "John Doe" });
|
||||
}
|
Reference in New Issue
Block a user