Merge pull request #5 from strongloop/feature/fix-readme
README: mount REST at /api in the sample code
This commit is contained in:
commit
7b091d28d1
|
@ -15,8 +15,8 @@ var Product = loopback.Model.extend('product');
|
||||||
Product.attachTo(loopback.memory());
|
Product.attachTo(loopback.memory());
|
||||||
app.model(Product);
|
app.model(Product);
|
||||||
|
|
||||||
app.use(loopback.rest());
|
app.use('/api', loopback.rest());
|
||||||
app.use('/explorer', explorer(app));
|
app.use('/explorer', explorer(app, { basePath: '/api' }));
|
||||||
|
|
||||||
app.listen(3000);
|
app.listen(3000);
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue