From 1b8de3673c9b6d6d8df5d187aa71159c0fd60838 Mon Sep 17 00:00:00 2001 From: Ritchie Martori Date: Tue, 5 Nov 2013 11:24:48 -0800 Subject: [PATCH] Readme updates --- README.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c13bcde..9871cfc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,22 @@ -loopback-explorer -================= +# loopback-explorer -Browse and test your LoopBack app's APIs +Browse and test your LoopBack app's APIs. + +## Basic Usage + +Below is a simple LoopBack application. The explorer is mounted at `/explorer`. + +```js +var loopback = require('loopback'); +var app = loopback(); +var explorer = require('loopback-explorer'); + +var Product = loopback.Model.extend('product'); +Product.attachTo(loopback.memory()); +app.model(Product); + +app.use(loopback.rest()); +app.use('/explorer', explorer(app)); + +app.listen(3000); +```