Folder structure of Node.js
The folder structure of Node.js is as shown below.I
/libs contains all custom classes functions and modules.
/vendor or /support contains all the 3rd party libraries.
/spec is used for specifications for BDD tests.
/test is used for unit-tests and for an application. When NPM introduced a clean package management /support and /vendor are deprecates. The frameworks like express and mongoose has some additional folders. Those are:
/models – It contains the ORM modules.
/view-Used to store all view templates.
/public- All static contents like images, style sheets, client-side javaScript are stored in this folder.
/assets/images-contains image files.
/assets/pdf-contains the pdf files.
/css-contains the stylesheets.
/js-contains all client side javaScript.
/controllers-It contains all your express routes .
The CoffeScript-based Express has these changes in the folde structure.
/app-conatains javaScript .
The assets folder has separate subfolders as assets/js and assets/css for storing css files and js files. Similarly the public folder is also divided into subfolders which contain js, css, and img.
/src-contains all server-side CoffeScript files.
Comments
0 comments
Please Sign in or Create an account to Post Comments