Home / Function/ getUrl() — fastify Function Reference

getUrl() — fastify Function Reference

Architecture documentation for the getUrl() function in listen.4.test.js from the fastify codebase.

Entity Profile

Dependency Diagram

graph TD
  8481a56b_a37a_df00_36fa_f7e280bf1e3e["getUrl()"]
  2d9c538f_25a1_1a33_10f7_1129947b11f9["listen.4.test.js"]
  8481a56b_a37a_df00_36fa_f7e280bf1e3e -->|defined in| 2d9c538f_25a1_1a33_10f7_1129947b11f9
  style 8481a56b_a37a_df00_36fa_f7e280bf1e3e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

test/listen.4.test.js lines 11–18

function getUrl (fastify, lookup) {
  const { port } = fastify.server.address()
  if (lookup.family === 6) {
    return `http://[${lookup.address}]:${port}/`
  } else {
    return `http://${lookup.address}:${port}/`
  }
}

Domain

Subdomains

Frequently Asked Questions

What does getUrl() do?
getUrl() is a function in the fastify codebase, defined in test/listen.4.test.js.
Where is getUrl() defined?
getUrl() is defined in test/listen.4.test.js at line 11.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free