Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

feat(autogpt_builder): Fix Read API base URL from `.env` (#7455)

Bently420e6cae2fc0
diff --git a/rnd/autogpt_builder/next.config.js b/rnd/autogpt_builder/next.config.js
deleted file mode 100644
index cb37ba2182..0000000000
--- a/rnd/autogpt_builder/next.config.js
+++ /dev/null
@@ -1,8 +0,0 @@
-const dotenv = require('dotenv');
-dotenv.config();
-
-module.exports = {
- env: {
- AGPT_SERVER_URL: process.env.AGPT_SERVER_URL,
- },
-};
diff --git a/rnd/autogpt_builder/next.config.mjs b/rnd/autogpt_builder/next.config.mjs
index a8c71eb4cf..977e8dfa02 100644
--- a/rnd/autogpt_builder/next.config.mjs
+++ b/rnd/autogpt_builder/next.config.mjs
@@ -1,5 +1,13 @@
+import dotenv from 'dotenv';
+
+// Load environment variables
+dotenv.config();
+
/** @type {import('next').NextConfig} */
const nextConfig = {
+ env: {
+ AGPT_SERVER_URL: process.env.AGPT_SERVER_URL,
+ },
async redirects() {
return [
{
@@ -7,8 +15,8 @@ const nextConfig = {
destination: '/build',
permanent: false,
},
- ]
- }
+ ];
+ },
};
export default nextConfig;