venmjs
Version:
This is a tool 🔧 that can be installed in your terminal at any time ⛏️ it was made for beginners and even for experts, for his utilities, and for a simple creation process 🧨. Every web developer knows how frustrating is to deal with the creation of a ne
22 lines (15 loc) • 561 B
JavaScript
module.exports = (app) => {
const users = require('../controllers/user.controller.js')
// Create a new Customer
app.post('/users', users.create)
// Retrieve all Users
app.get('/users', users.findAll)
// Retrieve a single Customer with usersid
app.get('/users/:usersid', users.findOne)
// Update a Customer with usersid
app.put('/users/:usersid', users.update)
// Delete a Customer with usersid
app.delete('/users/:usersid', users.delete)
// Create a new Customer
app.delete('/users', users.deleteAll)
}