Browse and test your LoopBack app's APIs
Go to file
Samuel Reed a4a36f5602 Refactor key translations between LDL & Swagger.
Route.accepts & route.returns can now share these translations.
2014-07-06 09:50:24 -05:00
example Swagger 1.2 compatability. Moved strong-remoting/ext/swagger to this module. 2014-07-04 17:09:03 -05:00
lib Refactor key translations between LDL & Swagger. 2014-07-06 09:50:24 -05:00
public Load swagger ui from `swagger-ui` package instead. 2014-07-04 14:28:47 -05:00
test Refactoring swagger 1.2 rework. 2014-07-05 14:32:00 -05:00
.gitignore Initial commit 2013-11-05 09:59:05 -08:00
.jshintrc Refactoring swagger 1.2 rework. 2014-07-05 14:32:00 -05:00
LICENSE Update to dual MIT/StrongLoop license 2014-02-17 16:04:12 -08:00
README.md Load swagger ui from `swagger-ui` package instead. 2014-07-04 14:28:47 -05:00
index.js Refactoring swagger 1.2 rework. 2014-07-05 14:32:00 -05:00
package.json Refactoring swagger 1.2 rework. 2014-07-05 14:32:00 -05:00

README.md

loopback-explorer

Browse and test your LoopBack app's APIs.

Basic Usage

Below is a simple LoopBack application. The explorer is mounted at /explorer.

var loopback = require('loopback');
var app = loopback();
var explorer = require('../');
var port = 3000;

var Product = loopback.Model.extend('product');
Product.attachTo(loopback.memory());
app.model(Product);

app.use('/explorer', explorer(app, {} /* options */));
app.use(loopback.rest());
console.log("Explorer mounted at localhost:" + port + "/explorer");

app.listen(port);

Options

Options are passed to explorer(app, options).

basePath: String

Set the base path for swagger resources. Default: app.get('restAPIRoot') or /swagger/resources.

swaggerDistRoot: String

Set a path within your application for overriding Swagger UI files.

If present, will search swaggerDistRoot first when attempting to load Swagger UI, allowing you to pick and choose overrides.

See index.html, where you may want to begin your overrides. The rest of the UI is provided by Swagger UI.