Node package for rapid ExpressJS routing buildout
Use this package when first building out the routes for your ExpressJS app. At the moment this package will create controller files that contain routes for GET and POST, but not PUSH and DELETE, so it's not yet suitable for API development.
When loaded into your app.js it will do the following:
It works with some basic assumptions:
This package works best when you can automatically load in your changes, so I've found that using an autoloader for controller files, along with a gulp task watching for file changes, really speeds up the development process when using this package. Having these two automation helpers allows the developer to point their browser to a URI they'd like to define, then just click on links and submit forms as they author them in order to completely define the project skeleton.
Here's some code samples that illustrate these ideas:
// dependenciesvar express =path =app =fs =session =bodyParser =pug = ;// environment variablesapp;app;app;// dynamically include routes (Controller)fs;// nodebuilder will handle any undefined routesapp;app;
gulpfile.js (adapted from https://gist.github.com/webdesserts/5632955):
var gulp =spawn = spawnnode;gulp;gulp;process;
Mike Ritchie has been developing web applications for over a decade, and is largely known for the "FuseBuilder" app, which allowed PHP and ColdFusion developers to rapidly describe their own web applications using the "Fusebox" framework and methodology. FuseBuilder was quite a bit more advanced in that it not only created a wireframe of the developer's app, it allowed the developer to actually create working forms and layouts in the view, along with model files with working SQL and controllers with actual business logic. Nodebuilder is an offshoot of this concept applied to the Node/Express paradym. It's hoped that one day Nodebuilder will have much of the same power.