Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

module.exports multiple functions

//backendcontrollersuserController.js
module.export.register= async(req,res)=> {
console.log("register controller");
}
module.export.login= async(req,res)=> {
console.log("Login controller");
}

//backend
outesuserRoutes.js
const { register, login } = require('../controllers/userController')
 
PREVIOUS NEXT
Tagged: #multiple #functions
ADD COMMENT
Topic
Name
8+2 =