Last active
July 4, 2016 09:01
-
-
Save tkssharma/4c753f656258467f7a4899ab6baed2a7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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