Use YARN to manage package
Install YARN
Install global grunt-cli
:
$ yarn add global grunt-cli
Open command-line in project:
- Install package:
$ yarn install
- Run app:
$ grunt
Now browse to the app at localhost:8080
tutorial-nodejs
├───assets -> contains font, images, etc
├───rules -> contains rule check conventions
└───src -> all of the source files for the application
├───config -> contains config for application
│ └───env -> contains config env for application
├───middlewares -> define middleware to handle request
├───models -> store data
├───routes -> define route for application
└───views -> contains page, partial etc to render UI
└───pages -> define page
└───partials -> define partials of page
├───app.js -> create application use express
├───main.js -> define application to host
index.js -> bootstrap application
package.json -> contains package used in application
Gruntfile.js -> define job to build and support develop