Home / Function/ getServerUrl() — fastify Function Reference

getServerUrl() — fastify Function Reference

Architecture documentation for the getServerUrl() function in helper.js from the fastify codebase.

Entity Profile

Dependency Diagram

graph TD
  73bc80c7_b496_d1b3_26df_1a8f579af22e["getServerUrl()"]
  f0958ec4_011b_97b2_8846_edbd37831a68["helper.js"]
  73bc80c7_b496_d1b3_26df_1a8f579af22e -->|defined in| f0958ec4_011b_97b2_8846_edbd37831a68
  style 73bc80c7_b496_d1b3_26df_1a8f579af22e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

test/helper.js lines 491–496

module.exports.getServerUrl = function (app) {
  const { address, port } = app.server.address()
  return address === '::1'
    ? `http://[${address}]:${port}`
    : `http://${address}:${port}`
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does getServerUrl() do?
getServerUrl() is a function in the fastify codebase, defined in test/helper.js.
Where is getServerUrl() defined?
getServerUrl() is defined in test/helper.js at line 491.

Analyze Your Own Codebase

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

Try Supermodel Free