use Javascript to write network and cloud applications • Why node: Create network applications using one language Javascript Use Javascript on the server and on the client Supports modular development
the node package manager Supports local and global package repositories • Npm commands: List installed modules: $ npm ls Install a global module: $ npm install -g [name] Install a local module: $ npm install [name]
a web application framework • Why express: Mature application framework Continuing development Supports modular designs Easy to use Supports web routing and asynchronous calls
use Javascript to write applications • Why node: Create network applications using one language Javascript Use Javascript on the server and on the client Accepted platform for cloud application development
own static web site • Convert the html to jade templates $ npm install -g html2jade Go to your static web directory Example: $ html2jade index.html Creates index.jade • Move your new static content (folders and all) into mysite/public • Clean up unused files and folders
Try it out $ cd mysite $ node app.js • Open to view at localhost:3000 • Document type and head are repeated Document type and head are repeated twice twice • Layout.js is the default layout template
site layout Cut your document type and header section from your converted index.jade Paste that into your layout.js Move index.jade “body” all the way to the top left • Jade uses indentation position so body needs to be at the top and to the left in your index.jade