MCPcopy
hub / github.com/7836246/cursor2api / checkServer

Function checkServer

test/e2e-chat.mjs:126–133  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

124// 检测服务器是否在线
125// ════════════════════════════════════════════════════════════════════
126async function checkServer() {
127 try {
128 const r = await fetch(`${BASE_URL}/v1/models`, { headers: { 'x-api-key': 'dummy' } });
129 return r.ok;
130 } catch {
131 return false;
132 }
133}
134
135// ════════════════════════════════════════════════════════════════════
136// 主测试

Callers 1

e2e-chat.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected