> For the complete documentation index, see [llms.txt](https://node-api.gitbook.io/nodpi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://node-api.gitbook.io/nodpi/create-new-controller.md).

# Create new controller

#### Create new controller with name \`users\` <a href="#starting-the-project" id="starting-the-project"></a>

```
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
    //}
    
        
    
```
