Add LAN-friendly dev scripts and env examples

This commit is contained in:
Abhimanyu Saharan
2026-02-01 22:31:42 +05:30
parent 3e4a6cf441
commit 01c8a64a6d
3 changed files with 12 additions and 2 deletions

View File

@@ -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://<YOUR_MACHINE_IP>:3000

4
frontend/.env.example Normal file
View File

@@ -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://<YOUR_MACHINE_IP>:8000

View File

@@ -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",