edit-task
Home
Up
Delete
Task Name:
Task Description:
#### - tutorial for getting started with nodejs
TaskGroup ID:
Start Date:
Start Time:
Duration:
Priority:
Status:
To Do
Completed
In Process
Add Photo:
Owner ID:
Content:
use HTML
Edit Content
<h1 style="text-align: center;">REVIEW VIDEO</h1> <h2>[previously]</h2> <ol> <li><strong>[00:00] install node and npm via webmatrix</strong></li> <ol> <li>]</li> </ol> <li><strong>[00:00] create a new "empty" node site using webmatrix templates</strong></li> <ol> <li>] empty != empty, empty === hello world example</li> <li>] demo</li> </ol> <li><strong>[00:00] serve static files from public directory</strong></li> <ol> <li>] css, javascript and images can be served from</li> </ol> <li><strong>[05:00] install express MVC framework for node using npm install</strong></li> <ol> <li>] use command line, navigate to current directory, run command to install package</li> </ol> <li><strong>[06:00] to use a package</strong></li> <ol> <li>] declare var = require(express);</li> <li>] demonstrated creating an http server with express VS std node, then sends same "hello world" using express</li> <li>] requesting <a href="http://localhost:3000/somethingElse">http://localhost:3000/somethingElse</a> - returns message cannot get s</li> </ol> <li><strong>[07:00] setting up a route, with an id parameter, custom url patterns</strong></li> <ol> <li>] a different response for a different request </li> </ol> <li><strong>[08:00] setting up a custom response for requests that dont match any defined routes, custom 404</strong></li> <ol> <li>] example - app.use (function(){resp,req,next}</li> </ol> <li><strong>[09:00] use app.use to log all requests to server, custom logging</strong></li> <ol> <li>] intercept all app requests, use console.log to</li> </ol> <li><strong>[10:00] render html using a templating system</strong></li> <ol> <li>] using ejs, npm install</li> <li>] edit custom url , instead of res.send("message")</li> <li>] use res.render("some data")</li> </ol> <li><strong>[11:00] create template to display data</strong></li> <ol> <li>] created new folder, views, to hold templates</li> <li>] new template, mypage.ejs extension</li> </ol> <li><strong>[12:00] summary</strong></li> <ol> <li>] in 20 lines of simple javascript and we have got ....</li> <li>] web server,</li> <li>] MVC framework</li> <li>] custom error messages</li> <li>] custom url patterns</li> <li>] custom logging</li> </ol></ol> <h2>[currently]</h2> <ol> <li>] </li> </ol> <h2>[next]</h2> <ol> <li>] ADD <iframe width="640" height="360" src="<a href="https://www.youtube.com/embed/gE4AsGKTv8k" target="_blank">https://www.youtube.com/embed/gE4AsGKTv8k</a>" frameborder="0" allowfullscreen></iframe></li> <li>] REF = learn node</li> </ol> <p> </p>