diff --git a/backend/.env.example b/backend/.env.example index ceeb771b..38ddbe22 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -1,2 +1,7 @@ +# Example config for local/dev. +# +# If you plan to access the app from another device (via machine IP), +# set CORS_ORIGINS to include that frontend origin too. + DATABASE_URL=postgresql+psycopg2://postgres:CHANGE_ME@127.0.0.1:5432/openclaw_agency -CORS_ORIGINS=http://localhost:3000 +CORS_ORIGINS=http://localhost:3000,http://:3000 diff --git a/frontend/.env.example b/frontend/.env.example new file mode 100644 index 00000000..d15afa9f --- /dev/null +++ b/frontend/.env.example @@ -0,0 +1,4 @@ +# When accessing the frontend from another device, the browser will call this URL. +# Use your machine IP (not 127.0.0.1). + +NEXT_PUBLIC_API_URL=http://:8000 diff --git a/frontend/package.json b/frontend/package.json index 82e1a2fb..aa2850ed 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -6,7 +6,8 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "eslint" + "lint": "eslint", + "dev:lan": "next dev --hostname 0.0.0.0 --port 3000" }, "dependencies": { "next": "16.1.6",