Files
inspector/client/bin/cli.js
2024-11-11 11:11:27 +00:00

19 lines
532 B
JavaScript
Executable File

#!/usr/bin/env node
import { join, dirname } from "path";
import { fileURLToPath } from "url";
import handler from "serve-handler";
import http from "http";
const __dirname = dirname(fileURLToPath(import.meta.url));
const distPath = join(__dirname, "../dist");
const server = http.createServer((request, response) => {
return handler(request, response, { public: distPath });
});
const port = process.env.PORT || 5173;
server.listen(port, () => {
console.log(`MCP inspector client running at http://localhost:${port}`);
});