MCPcopy Create free account
hub / github.com/Effect-TS/effect / formatAddress

Function formatAddress

packages/effect/src/unstable/http/HttpServer.ts:216–223  ·  view source on GitHub ↗
(address: Address)

Source from the content-addressed store, hash-verified

214 * @since 4.0.0
215 */
216export const formatAddress = (address: Address): string => {
217 switch (address._tag) {
218 case "UnixAddress":
219 return `unix://${address.path}`
220 case "TcpAddress":
221 return `http://${address.hostname}:${address.port}`
222 }
223}
224
225/**
226 * Reads the current server address, formats it with `formatAddress`, and passes

Callers 1

addressFormattedWithFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected