Currently mern-cli has generators for components(dumb, functional, container), models, routes, controllers.
merng dumb <componentname> //Generate a dumb React component
merng functional <componentName> //Generate a functional component
merng container <componentName //Generate a React component and connect to Redux store
merng route <routeName> //Generate an Express route and corresponding controller
merng model <modelName> //Generate a Mongoose Model
merng fullstack <modelName> // Generate a dumb component, Express route, controller and Mongoose Model
@mayank where should i define the routes it created ?
@nishu The routes are created in /server/routes/<name>.routes.js. You don't have to define anything. Just require the routes when you want to use them.
Sorry if this is a dumb question, I'm just starting with mern. When I try "merng fullstack <modelName>" I get:
"Provided generator command 'fullstack' is not available"
Mayank Chandola
Currently
mern-clihas generators for components(dumb, functional, container), models, routes, controllers.merng dumb <componentname> //Generate a dumb React component merng functional <componentName> //Generate a functional component merng container <componentName //Generate a React component and connect to Redux store merng route <routeName> //Generate an Express route and corresponding controller merng model <modelName> //Generate a Mongoose Model merng fullstack <modelName> // Generate a dumb component, Express route, controller and Mongoose Model