Updated Project Structure table

This commit is contained in:
Sahat Yalkabov
2014-02-06 07:21:47 -05:00
parent 56cac69379
commit bed77159b9

View File

@ -213,18 +213,18 @@ Project Structure
| **controllers**/home.js | Controller for home page (index). | | **controllers**/home.js | Controller for home page (index). |
| **controllers**/user.js | Controller for user account management page. | | **controllers**/user.js | Controller for user account management page. |
| **models**/User.js | Mongoose schema and model for User. | | **models**/User.js | Mongoose schema and model for User. |
| **public/*** | Static assets, i.e. fonts, css, js, img. | | **public/*** | Static assets (fonts, css, js, img) |
| **public/css**/styles.less | Main stylesheet for your app. | | **public/css**/styles.less | Main stylesheet for your app. |
| **public/css/themes**/default.less | Some Bootstrap overrides to make it look prettier. | | **public/css/themes**/default.less | Some Bootstrap overrides to make it look prettier. |
| **views/account/*** | Templates relating to user account. | | **views/account/*** | Templates for *login, signup, profile*. |
| **views/api/*** | Templates relating to API Examples. | | **views/api/*** | Templates for API Examples. |
| **views/partials**/flash.jade | Error, info and success notifications. | | **views/partials**/flash.jade | Error, info and success flash notifications. |
| **views/partials**/navigation.jade | Navbar partial template. | | **views/partials**/navigation.jade | Navbar partial template. |
| **views/partials**/footer.jade | Footer partial template. | | **views/partials**/footer.jade | Footer partial template. |
| **views**/layout.jade | Base template. | | **views**/layout.jade | Base template. |
| **views**/home.jade | Home page template. | | **views**/home.jade | Home page template. |
| app.js | Main application file. | | app.js | Main application file. |
| cluster_app.js | Creates multiple instances of `app.js` via Node.js clusters.| | cluster_app.js | Creates multiple processes of `app.js` using Node.js clusters.|
:exclamation: **Note:** There is no difference how you name or structure your views. You could place all your templates in a top-level `views` directory without having a nested folder structure, if that makes things easier for you. Just don't forget to update `extends ../layout` and corresponding `res.render()` method in controllers. For smaller apps, I find having a flat folder structure to be easier to work with. :exclamation: **Note:** There is no difference how you name or structure your views. You could place all your templates in a top-level `views` directory without having a nested folder structure, if that makes things easier for you. Just don't forget to update `extends ../layout` and corresponding `res.render()` method in controllers. For smaller apps, I find having a flat folder structure to be easier to work with.