Node.js in Action by T. J. Holowaychuk, Mike Cantelon, Marc Harter, Nathan

By T. J. Holowaychuk, Mike Cantelon, Marc Harter, Nathan Rajlich


Node.js in Action is an example-driven instructional that begins at sq. one and publications you thru the entire gains, ideas, and ideas you'll have to construct production-quality Node functions. You'll begin through studying easy methods to organize your Node improvement setting, together with loading the community-created extensions. subsequent, you'll run a number of uncomplicated demonstration courses the place you'll study the fundamentals of some universal varieties of Node purposes. Then you'll dive into asynchronous programming, a version Node leverages to reduce program bottlenecks.

About this Book

JavaScript at the server? You wager. Node.js is a JavaScript server able to helping scalable, high-performance net functions. utilizing asynchronous I/O, the server can do multiple factor at a time, a key requirement for real-time apps like chat, video games, and reside facts. and because it's JavaScript, you employ a similar language finish to end.

Node.js in Action exhibits you ways to construct production-quality functions. transparent introductions of key recommendations and example-by-example insurance take you from setup to deployment. You'll dive into asynchronous programming, facts garage, and output templating, and have interaction with the filesystem to create non-HTTP purposes like TCP/IP servers and command-line instruments. excellent for an online developer transitioning from Rails, Django, or personal home page. calls for simple wisdom of JavaScript. No earlier adventure with Node.js needed.

What's Inside

• manage Node and extensions
• Grok asynchronous programming and the development loop
• Examples together with microblogging, IM, video games, and more

About the Authors

As expert practitioners, specialist academics and running shoes, and individuals to the middle framework, authors Mike Cantelon, Marc Harter, T.J. Holowaychuk, and Nathan Rajlich symbolize the easiest of the Node.js improvement community.

Table of Contents

1. Welcome to Node.js
2. construction a multiroom chat application
3. Node programming fundamentals
PART 2: internet software improvement WITH NODE
4. development Node internet applications
5. Storing Node software data
6. Connect
7. Connect's integrated middleware
8. Express
9. complicated Express
10. checking out Node applications
11. net software templating
PART three: GOING additional WITH NODE
12. Deploying Node functions and conserving uptime
13. past internet servers
14. The Node atmosphere

Show description

Read or Download Node.js in Action PDF

Best javascript books


Develop smaller, lighter internet apps which are easy to create and straightforward to check, expand, and preserve as they develop. This hands-on advisor introduces you to AngularJS, the open resource JavaScript framework that makes use of Model–view–controller (MVC) structure, facts binding, client-side templates, and dependency injection to create a much-needed constitution for construction net apps.

Guided by way of engineers who labored on AngularJS at Google, you’ll stroll during the framework’s key good points, after which construct a operating AngularJS app—from structure to checking out, compiling, and debugging. You’ll find out how AngularJS is helping decrease the complexity of your internet app.
* Dive deep into Angular’s development blocks and find out how they interact
* achieve greatest flexibility by way of keeping apart common sense, facts, and presentation obligations with MVC
* gather your complete app within the browser, utilizing client-side templates
* Use AngularJS directives to increase HTML with declarative syntax
* converse with the server and enforce basic caching with the $http provider
* Use dependency injection to enhance refactoring, testability, and a number of surroundings layout
* Get code samples for universal difficulties you face in such a lot internet apps

Javascript 1.5 by example

Explores the pc language's up to date gains whereas explaining the best way to upload JavaScript to present HTML web content and reviewing syntax, notation, conventions, variable manipulation, good judgment statements, and item programming. creation. I. WELCOME TO JAVASCRIPT. 1. stepping into JavaScript! 2.

JavaScript and Ajax for the Web, Sixth Edition

Have to study JavaScript speedy? This best-selling reference’s visible structure and step by step, task-based directions can have you up and operating with JavaScript very quickly. during this thoroughly up to date version of our best-selling advisor to JavaScript, prime net and computing specialists Tom Negrino and Dori Smith use crystal-clear directions and pleasant prose to introduce you to all of modern-day JavaScript necessities.

Switching to Angular 2

Key FeaturesGet brand new with the newest alterations to Angular 2, together with the advancements to directives, swap detection, dependency injection, router, and moreUnderstand Angular 2's new component-based architectureStart utilizing TypeScript to supercharge your Angular 2 applicationsBook DescriptionAngularJS is a JavaScript framework that makes development net functions more uncomplicated.

Additional info for Node.js in Action

Sample text

Changing the class name in the library would require you to remember to repeat this hack each time you update the library in your application’s source tree. Naming collisions are a problem best avoided altogether. Node modules allow you to select what functions and variables from the included file are exposed to the application. If the module is returning more than one function or variable, the module can specify these by setting the properties of an object called exports. exports can instead be set.

The room will also be included in the list of available rooms to the right of the chat message area. 4. 4 The results of changing to a new room Application requirements and initial setup 17 application. The application shows how Node can simultaneously serve conventional HTTP data (like static files) and real-time data (chat messages). It also shows how Node applications are organized and how dependencies are managed. Let’s now look at the technologies needed to implement this application. 2 Application requirements and initial setup The chat application you’ll create needs to do the following:  Serve static files (such as HTML, CSS, and client-side JavaScript)  Handle chat-related messaging on the server  Handle chat-related messaging in the user’s web browser To serve static files, you’ll use Node’s built-in http module.

2 in it. These declarations will give you access to Node’s HTTP-related functionality, the ability to interact with the filesystem, functionality related to file paths, and the ability to determine a file’s MIME type. The cache variable will be used to cache file data. 8 In this chat application, there’s both client-side and serverside JavaScript logic. FILE DATA AND ERROR RESPONSES Next you need to add three helper functions used for serving static HTTP files. The first will handle the sending of 404 errors when a file is requested that doesn’t exist.

Download PDF sample

Rated 4.91 of 5 – based on 26 votes