-
Notifications
You must be signed in to change notification settings - Fork 1
Getting Started
$ brew install node
or directly from the node website
$ npm install express --save
$ cd directory/of/git/repo
$ npm init
# follow instructions
$ npm install express --save
$ npm install express-generator -g
# scafolding
$ express --view=pug website
# pug templating engine (the new jade)
$ cd website
$ npm install
$ npm start
The project can be found at http://localhost:3000
A link to the setup guide can be found here here
.
├── app.js
├── bin
│ └── www
├── package.json
├── public
│ ├── images
│ ├── javascripts
│ └── stylesheets
│ └── style.css
├── routes
│ ├── index.js
│ └── users.js
└── views
├── error.pug
├── index.pug
└── layout.pug
7 directories, 9 files
$ cd into/git/repo/../website
$ npm start
or
$ DEBUG=website:* npm start
# to debug
If your new to node, hopefully the following clarifies a few things for you. Running npm start will call our app.js
file located in the website
project directory. This file will then make the calls to the different MVC components. The views are located in \views
. The index.html is instead called index.pug and uses the pug templating engine to render the view.