loopback-component-explorer/example/simple.js

13 lines
278 B
JavaScript
Raw Normal View History

2013-11-05 19:16:59 +00:00
var loopback = require('loopback');
var app = loopback();
var explorer = require('../');
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);