Herron, David, 1820-1900 Herron, David, 1820-1900

Node Web Development. - 2nd ed - Birmingham, England : Packt Publishing, 2013. Birmingham, England : Packt Publishing ;, 2013. - 1 online resource (248 pages)

Includes bibliographical references and index.

Cover; Copyright; Credits; About the Author; Acknowledgement; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: About Node; The capabilities of Node; Server-side JavaScript; Why should you use Node?; Threaded versus asynchronous event-driven architecture; Performance and utilization; Is Node a cancerous scalability disaster?; Server utilization, the bottom line, and green web hosting; What's in a name: Node, Node.js, or Node. JS?; Summary; Chapter 2: Setting up Node; System requirements; Installing Node using package managers; Installing on Mac OS X with MacPorts. Installing on Mac OS X with HomebrewInstalling on Linux from package management systems; Installing the Node distribution from nodejs.org; Installing Node on Windows using Chocolatey Gallery; Installing the StrongLoop Node distribution; Installing from source on POSIX-like systems; Installing prerequisites; Installing developer tools on Mac OS X; Installing from source for all POSIX-like systems; Maintaining multiple Node installs simultaneously; Run a few commands; testing the commands; Node's command-line tools; Running a simple script with Node; Launching a server with Node. Npm -- the Node package managerStarting Node servers at system startup; Summary; Chapter 3: Node Modules; Defining a module; Node modules; Node's algorithm for resolving require(module); Module identifiers and path names; Local modules within your application; Bundling external dependencies with your application; System-wide modules in NODE_PATH and elsewhere; Complex modules -- modules as directories; Node package manager; The npm package format; Finding npm packages; Using the npm commands; Getting help with npm; Viewing package information; Installing an npm package. Installing native code modules on WindowsInstalling packages local to a module; Eliminating duplicate modules installed beneath node_modules; Listing the currently installed packages; Package scripts; Editing and exploring installed package content; Updating outdated packages you've installed; Uninstalling an installed npm package; Developing and publishing npm packages; npm configuration settings; Package version strings and ranges; CommonJS modules; Demonstrating module encapsulation; Summary; Chapter 4: HTTP Servers and Clients -- A Web Application's First Steps. Sending and receiving events with EventEmittersEventEmitter theory; HTTP server applications; HTTP Sniffer -- listening to the HTTP conversation; Web application frameworks; Getting started with Express; Walking through the default Express application; Calculating the Fibonacci sequence with Express; Computationally intensive code and the event loop; Algorithmic refactoring; Making HTTP Client requests; Calling a REST backend service from an Express application; Implementing a simple REST server with Express; Refactoring the Fibonacci application for REST; Some RESTful Node modules; Summary.

Cover; Copyright; Credits; About the Author; Acknowledgement; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: About Node; The capabilities of Node; Server-side JavaScript; Why should you use Node?; Threaded versus asynchronous event-driven architecture; Performance and utilization; Is Node a cancerous scalability disaster?; Server utilization, the bottom line, and green web hosting; What's in a name: Node, Node.js, or Node. JS?; Summary; Chapter 2: Setting up Node; System requirements; Installing Node using package managers; Installing on Mac OS X with MacPortsInstalling on Mac OS X with HomebrewInstalling on Linux from package management systems; Installing the Node distribution from nodejs.org; Installing Node on Windows using Chocolatey Gallery; Installing the StrongLoop Node distribution; Installing from source on POSIX-like systems; Installing prerequisites; Installing developer tools on Mac OS X; Installing from source for all POSIX-like systems; Mai ... Presented in a simple, step-by-step format, this book is an introduction to web development with Node. This book is for anybody looking for an alternative to the ""P"" languages (Perl, PHP, Python), or anyone looking for a new paradigm of server-side application development. The reader should have at least a rudimentary understanding of JavaScript and web application development.

9781782163312 9781782163305