Created
February 1, 2017 14:16
-
-
Save Mozartted/978d833a6c14ed2e620f792eed493dac to your computer and use it in GitHub Desktop.
This file contains 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
//the route would use the express api to perform operations | |
//using the Todo.Controllers.js | |
var Todo = require('./controller/Todo.Controllers'); | |
//create,retrieve,update, delete | |
module.exports=function(app){ | |
app.post('/api/todo',Todo.Create);//create | |
app.delete('/api/todo/:id',Todo.Delete);//delete | |
app.get('/api/todo',Todo.RetrieveAll);//retrieve | |
app.post('/api/todo/:id',Todo.Update);//update | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment