Commit
·
55109cc
1
Parent(s):
a55fe46
add env
Browse files- .gitignore +0 -1
- frontend/.env.development +2 -0
- frontend/.env.production +2 -0
- frontend/.gitignore +0 -3
- frontend/app/WebSocketContext.js +2 -0
.gitignore
CHANGED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
.env.local
|
|
|
|
|
|
frontend/.env.development
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
NEXT_PUBLIC_SERVICES_URL = "http://192.168.1.3:8766"
|
| 2 |
+
NEXT_PUBLIC_RELAY_URL = "WS://192.168.1.3:8765/ws"
|
frontend/.env.production
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
NEXT_PUBLIC_SERVICES_URL = https://Hans-R-D-nexus-services.hf.space
|
| 2 |
+
NEXT_PUBLIC_RELAY_URL = wss://Hans-R-D-nexus-relay.hf.space/ws
|
frontend/.gitignore
CHANGED
|
@@ -30,9 +30,6 @@ yarn-debug.log*
|
|
| 30 |
yarn-error.log*
|
| 31 |
.pnpm-debug.log*
|
| 32 |
|
| 33 |
-
# env files (can opt-in for committing if needed)
|
| 34 |
-
.env*
|
| 35 |
-
|
| 36 |
# vercel
|
| 37 |
.vercel
|
| 38 |
|
|
|
|
| 30 |
yarn-error.log*
|
| 31 |
.pnpm-debug.log*
|
| 32 |
|
|
|
|
|
|
|
|
|
|
| 33 |
# vercel
|
| 34 |
.vercel
|
| 35 |
|
frontend/app/WebSocketContext.js
CHANGED
|
@@ -13,6 +13,8 @@ export const WebSocketProvider = ({ children }) => {
|
|
| 13 |
useEffect(() => {
|
| 14 |
const relayUrl = process.env.NEXT_PUBLIC_RELAY_URL;
|
| 15 |
|
|
|
|
|
|
|
| 16 |
if (!relayUrl) {
|
| 17 |
console.error('Environment variable NEXT_PUBLIC_RELAY_URL is not defined.');
|
| 18 |
return;
|
|
|
|
| 13 |
useEffect(() => {
|
| 14 |
const relayUrl = process.env.NEXT_PUBLIC_RELAY_URL;
|
| 15 |
|
| 16 |
+
console.log(relayUrl)
|
| 17 |
+
|
| 18 |
if (!relayUrl) {
|
| 19 |
console.error('Environment variable NEXT_PUBLIC_RELAY_URL is not defined.');
|
| 20 |
return;
|