Skip to content

Commit ba60245

Browse files
committed
Add port override
1 parent 8d8878d commit ba60245

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/dev-server.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,20 @@
77
* for changes, automatically rebuilding when needed.
88
*
99
* Usage: npm run dev
10+
*
11+
* To use a different port:
12+
* PORT=3000 npm run dev
13+
*
14+
* Then update the MCP server command to match:
15+
* pnpm run dev:local-resources (and update wrangler --var flag)
1016
*/
1117

1218
const http = require('http');
1319
const fs = require('fs');
1420
const path = require('path');
1521
const { spawn } = require('child_process');
1622

17-
const PORT = 8765;
23+
const PORT = process.env.PORT || 8765;
1824
const ZIP_PATH = path.join(__dirname, '..', 'dist', 'examples-mcp-resources.zip');
1925

2026
// Directories to watch for changes

0 commit comments

Comments
 (0)