Created
December 28, 2017 21:45
-
-
Save aramkoukia/eeed7b9ac3b423f2b1254e9be85ab9ae to your computer and use it in GitHub Desktop.
routes js
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
| const express = require('express'); | |
| const router = express.Router(); | |
| const todoService = require('./todo.service'); | |
| router.get('/todoes', (req, res) => { | |
| todoService.getToDoes(req, res); | |
| }); | |
| router.post('/todo', (req, res) => { | |
| todoService.postToDo(req, res); | |
| }); | |
| router.put('/todo/:id', (req, res) => { | |
| todoService.putToDo(req, res); | |
| }); | |
| router.delete('/todo/:id', (req, res) => { | |
| todoService.deleteToDo(req, res); | |
| }); | |
| module.exports = router; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment