Training Guide: Programming in HTML5 with JavaScript and CSS3 Ebook
Answers CHAPTER 7 339 Correct answer: D A. Incorrect: There is no slider type. B. Incorrect: The number type accepts numbers an ...
...
341 Chapter 8 Websites and services CHAPTER 8 Websites and services T he previous chapters have presented many things you can do ...
342 CHAPTER 8 Websites and services After this lesson, you will be able to: ■■Install Node.js. ■■Create a Node.js webpage. Estim ...
Lesson 1: Getting started with Node.js CHAPTER 8 343 When the createServer function is executed, a server object is returned. Th ...
344 CHAPTER 8 Websites and services var http = require('http'); var url = require('url'); http.createServer(function (request, r ...
Lesson 1: Getting started with Node.js CHAPTER 8 345 http.createServer(function (request, response) { var url_parts = url.parse( ...
346 CHAPTER 8 Websites and services The following is a typical folder structure for creating a package. You start by creating a ...
Lesson 1: Getting started with Node.js CHAPTER 8 347 module.exports = { addition: add, subtraction: subtract } In the simple_mat ...
348 CHAPTER 8 Websites and services In the advanced_math.js file, the require function also references the call_counter.js mod- ...
Lesson 1: Getting started with Node.js CHAPTER 8 349 The following functions are available in the math_example package. addit ...
350 CHAPTER 8 Websites and services "addition", "subtraction", "multiplication", "division", "fibonacci" ], "author": "Glenn Joh ...
Lesson 1: Getting started with Node.js CHAPTER 8 351 You see npm sending HTTP GET and PUT methods until the publishing is comple ...
352 CHAPTER 8 Websites and services After the package is globally installed, create a link to the global install from each appli ...
Lesson 1: Getting started with Node.js CHAPTER 8 353 console.log('addition(5,10) = ' + result); console.log(); result = math_exa ...
354 CHAPTER 8 Websites and services Uninstalling a package Uninstall a local package by executing the following command from the ...
Lesson 1: Getting started with Node.js CHAPTER 8 355 "version": "0.0.0", "description": "A simple Web site", "main": "index.js", ...
356 CHAPTER 8 Websites and services FIGURE 8-7 nstalling express, which also installs its dependenciesI Using Visual Studio 2012 ...
Lesson 1: Getting started with Node.js CHAPTER 8 357 app.get('/', function(request, response){ response.send('Hello World'); }); ...
358 CHAPTER 8 Websites and services This statement starts with app.use, which mounts a path from which to serve files. In the ap ...
«
14
15
16
17
18
19
20
21
22
23
»
Free download pdf