Skip to content

Instantly share code, notes, and snippets.

@tkssharma
Last active July 4, 2016 09:01
Show Gist options
  • Save tkssharma/4c753f656258467f7a4899ab6baed2a7 to your computer and use it in GitHub Desktop.
Save tkssharma/4c753f656258467f7a4899ab6baed2a7 to your computer and use it in GitHub Desktop.
var loopback = require('loopback');
var app = module.exports = loopback();
var Item = loopback.createModel(
'Item',
{
description: 'string',
completed: 'boolean'
}
);
app.model(Item);
app.use('/api', loopback.rest());
app.listen(8080);
POST /Items
GET /Items
PUT /Items
PUT /Items/{id}
HEAD /Items/{id}
GET /Items/{id}
DELETE /Items/{id}
GET /Items/{id}/exists
GET /Items/count
GET /Items/findOne
POST /Items/update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment