This example demonstrates the inspection of LoopBack 4 application context hierarchy.
The PingController now exposes the /inspect
and /graph
endpoint.
npm i
npm start
-
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)
-
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)
-
http://localhost:3000/graph-d3: Display the graph using d3-graphviz.
npm test