{"library":"loopback-component-explorer","title":"LoopBack Component Explorer","description":"loopback-component-explorer is a utility for LoopBack 3 applications, providing an interactive UI to browse and test API endpoints. It is currently at version 6.5.1 and is intrinsically linked to LoopBack 3, which is in \"Maintenance LTS mode.\" This means the component itself receives only critical bug fixes and security patches, with no new feature development. Its primary function is to render the API specification using an embedded `swagger-ui` (version 2.x), enabling developers to visualize and interact with their API routes directly within the browser. Its release cadence is sporadic, tied to critical fixes for the EOL LoopBack 3 framework. A key differentiator is its seamless integration into the LoopBack 3 ecosystem, acting as the standard API documentation and testing tool for that framework generation. Users are strongly encouraged to migrate to LoopBack 4, which uses a different explorer component.","language":"javascript","status":"maintenance","last_verified":"Sun Apr 19","install":{"commands":["npm install loopback-component-explorer"],"cli":null},"imports":["const explorer = require('loopback-component-explorer');","explorer.routes(app, { basePath: '/api' });"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"var loopback = require('loopback');\nvar app = loopback();\nvar explorer = require('loopback-component-explorer');\nvar port = 3000;\n\nvar Product = loopback.Model.extend('product');\nProduct.attachTo(loopback.memory());\napp.model(Product);\n\napp.use('/api', loopback.rest());\n\n// Register explorer using component-centric API:\nexplorer(app, { basePath: '/api', mountPath: '/explorer' });\n// Alternatively, register as a middleware:\n// app.use('/explorer', explorer.routes(app, { basePath: '/api' }));\n\nconsole.log(\"Explorer mounted at localhost:\" + port + \"/explorer\");\n\napp.listen(port);","lang":"javascript","description":"Demonstrates how to initialize a basic LoopBack 3 application and mount the API Explorer at a specified path, exposing a simple 'Product' model.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}