loopback4-example-inspect

Inspection of LoopBack 4 application context chain

Stars
3

loopback4-example-inspect

This example demonstrates the inspection of LoopBack 4 application context hierarchy.

The PingController now exposes the /inspect and /graph endpoint.

Try out

npm i
npm start

Endpoints

  1. http://localhost:3000/inspect: Fetch a JSON document for the context hierarchy.

    The following query parameters are supported:

    • includeParent: include parent contexts (default: true)
    • includeInjections: include injections (default: true)
    • includeGraph: include a graph in graphviz dot format (default: true)
  2. http://localhost:3000/graph: Render the LoopBack application as a SVG diagram.

    The following query parameters are supported:

    • includeParent: include parent contexts (default: true)
    • includeInjections: include injections (default: true)
    • format: dot or svg (default: svg)
  3. http://localhost:3000/graph-d3: Display the graph using d3-graphviz.

Sample graph

Test

npm test