Last active
September 7, 2017 20:57
-
-
Save nomanHasan/9f9976ba630d6bcfaafdbe21fc2dff0f to your computer and use it in GitHub Desktop.
Todo Route Complete
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
var express = require('express') | |
var router = express.Router() | |
// Getting the Todo Controller that we just created | |
var ToDoController = require('../../controllers/todos.controller'); | |
// Map each API to the Controller FUnctions | |
router.get('/', ToDoController.getTodos) | |
router.post('/', ToDoController.createTodo) | |
router.put('/', ToDoController.updateTodo) | |
router.delete('/:id',ToDoController.removeTodo) | |
// Export the Router | |
module.exports = router; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment