Refactoring the API
Let's see how we can create both tasks at the same time with the help of the subgenerator CRUD module:
- In the terminal, type the following command:
yo meanjs:crud-module speakers
Note that the last word is the name we give to the module that will be created.
Tip
More information about the MEAN.JS generator and sub-generator CRUD can be found at http://meanjs.org/generator.html#crud-module.
After the process, we have the following information on the terminal window:
Note that we respond to the three optional questions while creating the new module: whether we want to include a folder for CSS and images and two directories for Angular, ...
Get Learning Single-page Web Application Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.