var Item;
var app;
app.model(Item);
app.use('/api', loopback.rest());
app.listen(8080);
// REST API
DELETE /items/{id}
GET /items
GET /items/count
GET /items/findOne
GET /items/{id}
GET /items/{id}/exists
POST /items
PUT /items
PUT /items/{id}
// ADD explorer function to /api
var explorer = require('loopback-explorer');
app.use('/explorer', explorer(app, {basePath: '/api'}));
bloodless
class Item {
String title;
int value;
Item(this.title, this.value);
}
@app.Route("/api")
restfun(){
app.model(item);
app.model(foo);
}
main() {
app.setupConsoleLog();
app.start();
}
luizmineo/redstone.dart
loopback example code
bloodless
ref