From 604248ec17d472b3831cd41cbbaba669a1eecb96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Thu, 16 Oct 2014 10:17:47 +0200 Subject: [PATCH] example: use PersistedModel instead of Model Use `PersistedModel` as a base for the Product model to ensure it has some methods to inspect in the explorer. --- example/simple.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/simple.js b/example/simple.js index 3705ca5..70937cd 100644 --- a/example/simple.js +++ b/example/simple.js @@ -3,7 +3,7 @@ var app = loopback(); var explorer = require('../'); var port = 3000; -var Product = loopback.Model.extend('product', { +var Product = loopback.PersistedModel.extend('product', { foo: {type: 'string', required: true}, bar: 'string', aNum: {type: 'number', min: 1, max: 10, required: true, default: 5} @@ -14,6 +14,6 @@ app.model(Product); var apiPath = '/api'; app.use('/explorer', explorer(app, {basePath: apiPath})); app.use(apiPath, loopback.rest()); -console.log('Explorer mounted at localhost:' + port + '/explorer'); +console.log('Explorer mounted at http://localhost:' + port + '/explorer'); app.listen(port);