mirror of
https://github.com/open-gitagent/langship.sh.git
synced 2026-08-03 07:21:04 +02:00
- Introduced a new "Agents" section in the app sidebar for better navigation. - Enhanced the Inspector component to support typed forms for various node types, improving user experience when configuring nodes. - Created a new NodeForm component to handle specific forms for different node types, including Trigger, Build, Test, Eval, Policy, Approval, Deploy, Promote, and Rollback. - Updated the API layer to manage agents, including listing, creating, deleting, and testing agent authentication. - Modified the node catalog to include new node types and their respective configurations. - Adjusted the Next.js configuration and Nginx settings to reflect changes in API endpoint ports.
23 lines
730 B
JavaScript
23 lines
730 B
JavaScript
/** @type {import('next').NextConfig} */
|
|
const isProd = process.env.NODE_ENV === "production";
|
|
|
|
// Where the Go backend is listening during `npm run dev`.
|
|
const apiTarget = process.env.FLOW_API_URL ?? "http://localhost:8090";
|
|
|
|
const nextConfig = {
|
|
// Static export only at build time — the Go binary embeds ./out.
|
|
// In dev, leave Next as a normal server so we can proxy /api → Go.
|
|
...(isProd ? { output: "export" } : {}),
|
|
images: { unoptimized: true },
|
|
trailingSlash: true,
|
|
reactStrictMode: true,
|
|
|
|
// Dev-only: forward API calls to the Go server.
|
|
async rewrites() {
|
|
if (isProd) return [];
|
|
return [{ source: "/api/:path*", destination: `${apiTarget}/api/:path*` }];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|