MCPcopy Create free account
hub / github.com/deepnote/deepnote / isPortInUse

Function isPortInUse

packages/runtime-core/src/server-starter.ts:148–154  ·  view source on GitHub ↗

* Check if a port is in use.

(port: number)

Source from the content-addressed store, hash-verified

146 * Check if a port is in use.
147 */
148async function isPortInUse(port: number): Promise<boolean> {
149 try {
150 return await tcpPortUsed.check(port, '127.0.0.1')
151 } catch {
152 return false
153 }
154}
155
156/**
157 * Wait for the server to respond to health checks.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected