Created
September 16, 2019 18:27
-
-
Save artemis15/e0f0ed4c0969c0fc3c5cca3bcb8ab9bf to your computer and use it in GitHub Desktop.
Controlling logic for api routing based on HTTP Methods
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
const express = require('express'); | |
const userService = require('../../services/users/userService'); | |
let userControllerRouter = express.Router(); | |
userControllerRouter.get('/', userService.getUsers); | |
userControllerRouter.post('/', userService.createUser); | |
module.exports = userControllerRouter; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment