Nutshell
Very simple utility to create & generate MVC architecture.
How to install
npm install nutshell -g
How it works
Nuthshell comes with a two types of patterns: clean
and generate
.
The first of them simply creates a structure for your MVC application.
The second type create a structure and add a simple logic for demonstration work.
To use Nutshell clean type, open a terminal, navigate to a directory where you have rights to create files, and type:
nutshell myapp -clean
This will create a Express application called myapp with MVC structure.
To use Nutshell generate type, open a terminal, navigate to a directory where you have rights to create files, and type:
nutshell myapp -generate
This will create a Express application called myapp with MVC structure and simple logic.
Any of the preceding commands created a folder in your working directory. This directory has a number of auto-generated files and folders that make up the structure of a Express MVC application.
myapp
/controllers/index.js – for express routes;
/models/index.js – for ORM models (called Schemas in mongoose);
/public/css/style.css – style sheet document;
/public/js/script.js – client side JavaScript;
/public/img/ – for static image files;
/views/layout.jade – for view-templates;
server.js – node server;
Nutshell generate type adds simple logic to the previous structure, and create index.jade file in /views/.