Once plugged the block on the base generated with:
yo stack-lego:block express
Then start, express have much functions to do routing, authorization, statics files etc.. this block split all this functions with a command for each one:
Please don't remove the comments, this block exits two streams for build one app
Just when the generator asking for something like if you wanna create one folder for something answer no allway, this way mean everything will be generated on the app.js file, this is only recommended if you do not know the modules used in this block, then a list of the modules:
Just when the generator asking for something like if you wanna create one folder for something answer yes allway , this way the generator got to split the app in separate folders while generate all.
This way display all set command that this block have
yo stack-lego:express set
Add param method with the name provide for the user in setting folder or the file app.js .
yo stack-lego:express set param
Set one attribute called views in the app object to be used after.
yo stack-lego:express set view
Set one attribute called engine render in the app object to be used after.
yo stack-lego:express set engine
Set the folder where is you statics file according the path provider for the user relative to the setting folder or the main file app.js
yo stack-lego:express set static
Generate one route with the method and path providers for the user and one file with the name of the path that contain the class to handler all this thing that route need,in case of user choice not get the setting > route then this will generate in the main file app.js
yo stack-lego:express route <method in uppercase> <path>
Too can be used on existing routes, with diferent method
yo stack-lego:express route <method in uppercase> <path> Auth
Add the Auth
attribute in the and of command and will generate one route with authenticacion
So easy
gulp