Skip to content

Commit 919b040

Browse files
zcuderchen zhang
andauthored
merge NEXT_PUBLIC_SERVER_BASE_URL env to SERVER_BASE_URL (#240)
* merge NEXT_PUBLIC_SERVER_BASE_URL env to SERVER_BASE_URL * fix typo --------- Co-authored-by: chen zhang <[email protected]>
1 parent 1f5b9f2 commit 919b040

File tree

6 files changed

+8
-9
lines changed

6 files changed

+8
-9
lines changed

README.ja.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ deepwiki/
183183
| `OPENAI_API_KEY` | 埋め込みのための OpenAI API キー || |
184184
| `OPENROUTER_API_KEY` | 代替モデルのための OpenRouter API キー || OpenRouter モデルを使用する場合にのみ必須です |
185185
| `PORT` | API サーバーのポート(デフォルト:8001) || API とフロントエンドを同じマシンでホストする場合、`NEXT_PUBLIC_SERVER_BASE_URL`のポートを適宜変更してください |
186-
| `NEXT_PUBLIC_SERVER_BASE_URL` | API サーバーのベース URL(デフォルト:`http://localhost:8001`|| |
186+
| `SERVER_BASE_URL` | API サーバーのベース URL(デフォルト:`http://localhost:8001`|| |
187187

188188
### 設定ファイル
189189

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ services:
1414
- PORT=${PORT:-8001}
1515
- NODE_ENV=production
1616
- SERVER_BASE_URL=http://localhost:${PORT:-8001}
17-
- NEXT_PUBLIC_SERVER_BASE_URL=http://localhost:${PORT:-8001}
1817
- LOG_LEVEL=${LOG_LEVEL:-INFO}
1918
- LOG_FILE_PATH=${LOG_FILE_PATH:-api/logs/application.log}
2019
volumes:

src/app/[owner]/[repo]/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ Remember:
457457

458458
try {
459459
// Create WebSocket URL from the server base URL
460-
const serverBaseUrl = process.env.NEXT_PUBLIC_SERVER_BASE_URL || 'http://localhost:8001';
460+
const serverBaseUrl = process.env.SERVER_BASE_URL || 'http://localhost:8001';
461461
const wsBaseUrl = serverBaseUrl.replace(/^http/, 'ws');
462462
const wsUrl = `${wsBaseUrl}/ws/chat`;
463463

@@ -750,7 +750,7 @@ IMPORTANT:
750750

751751
try {
752752
// Create WebSocket URL from the server base URL
753-
const serverBaseUrl = process.env.NEXT_PUBLIC_SERVER_BASE_URL || 'http://localhost:8001';
753+
const serverBaseUrl = process.env.SERVER_BASE_URL || 'http://localhost:8001';
754754
const wsBaseUrl = serverBaseUrl.replace(/^http/, 'ws');
755755
const wsUrl = `${wsBaseUrl}/ws/chat`;
756756

@@ -1584,7 +1584,7 @@ IMPORTANT:
15841584
const cachedData = await response.json(); // Returns null if no cache
15851585
if (cachedData && cachedData.wiki_structure && cachedData.generated_pages && Object.keys(cachedData.generated_pages).length > 0) {
15861586
console.log('Using server-cached wiki data');
1587-
if(cachedData.mode) {
1587+
if(cachedData.model) {
15881588
setSelectedModelState(cachedData.model);
15891589
}
15901590
if(cachedData.provider) {

src/app/[owner]/[repo]/slides/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ Give me the numbered list with brief descriptions for each slide. Be creative bu
265265

266266
try {
267267
// Create WebSocket URL from the server base URL
268-
const serverBaseUrl = process.env.NEXT_PUBLIC_SERVER_BASE_URL || 'http://localhost:8001';
268+
const serverBaseUrl = process.env.SERVER_BASE_URL || 'http://localhost:8001';
269269
const wsBaseUrl = serverBaseUrl.replace(/^http/, 'ws');
270270
const wsUrl = `${wsBaseUrl}/ws/chat`;
271271

@@ -541,7 +541,7 @@ Please return ONLY the HTML with no markdown formatting or code blocks. Just the
541541

542542
try {
543543
// Create WebSocket URL from the server base URL
544-
const serverBaseUrl = process.env.NEXT_PUBLIC_SERVER_BASE_URL || 'http://localhost:8001';
544+
const serverBaseUrl = process.env.SERVER_BASE_URL || 'http://localhost:8001';
545545
const wsBaseUrl = serverBaseUrl.replace(/^http/, 'ws');
546546
const wsUrl = `${wsBaseUrl}/ws/chat`;
547547

src/app/[owner]/[repo]/workshop/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ Make the workshop content in ${language === 'en' ? 'English' :
313313

314314
try {
315315
// Create WebSocket URL from the server base URL
316-
const serverBaseUrl = process.env.NEXT_PUBLIC_SERVER_BASE_URL || 'http://localhost:8001';
316+
const serverBaseUrl = process.env.SERVER_BASE_URL || 'http://localhost:8001';
317317
const wsBaseUrl = serverBaseUrl.replace(/^http/, 'ws');
318318
const wsUrl = `${wsBaseUrl}/ws/chat`;
319319

src/utils/websocketClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
// Get the server base URL from environment or use default
7-
const SERVER_BASE_URL = process.env.NEXT_PUBLIC_SERVER_BASE_URL || 'http://localhost:8001';
7+
const SERVER_BASE_URL = process.env.SERVER_BASE_URL || 'http://localhost:8001';
88

99
// Convert HTTP URL to WebSocket URL
1010
const getWebSocketUrl = () => {

0 commit comments

Comments
 (0)