Middleware to generate the front-end of Jungles
Middleware will take the current url and find the related instance and it will load the whole tree.
You get the following locals in your views:
reslocalstree // The complete tree of the projectreslocalscurrent // The current instance
var middleware = require'jungles-middleware';appget':path(*)' middlewarejungles;
This middleware will allow you to add a middleware method to your types. If you don't specifiy this method it will try and render a view with the name of your type. So if you have a product type it will try and look for views/product view.
var product =
Because the whole tree structure is loaded into memory on each request this module might not be suited for big sites. So start with this module if you run into performance issues fork it and make some adjustments.
If you do think about premature optimizing your site I would like to leave you with the this message: