This is a Next.js project bootstrapped with create-next-app.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
项目使用以下环境变量文件来管理不同环境下的配置:
.env.development- 开发环境配置,应用于npm run dev.env.production- 生产环境配置,应用于npm run build和npm run start.env.local- 本地配置覆盖(不应提交到版本控制)
| 环境变量 | 描述 | 默认值 |
|---|---|---|
NEXT_PUBLIC_API_BASE_URL |
API 服务端点 | 开发: http://localhost:8000/api生产: 使用公网 IP |
NEXT_PUBLIC_SITE_URL |
站点 URL | 开发: http://localhost:3000生产: 使用公网 IP |
部署到生产环境前,请修改 .env.production 文件中的 NEXT_PUBLIC_API_BASE_URL 和 NEXT_PUBLIC_SITE_URL,设置为实际的公网 IP 或域名。
# .env.production 示例
NEXT_PUBLIC_API_BASE_URL=http://your-domain-or-ip:8000/api
NEXT_PUBLIC_SITE_URL=http://your-domain-or-ipTo learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.