Add LAN-friendly dev scripts and env examples
This commit is contained in:
@@ -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
4
frontend/.env.example
Normal 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
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user