Create new controller
Create new controller with name `users`
nodpi c users
New controller will be added with name users.controller.js
as follows
//******************************************
//* Explanation
//* Author
//* Routes
//* GET : Get All Users
//******************************************
const express = require('express');
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
const router = express.Router();
//router.get('/', getAllUsers);
module.exports = router;
//********************************************
//* Explanation
//********************************************
//function getAllUsers(req, res, next) {
// your code goes here
//}
Last updated
Was this helpful?