Node Cookbook: Second Edition
eBook - ePub

Node Cookbook: Second Edition

  1. 379 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Node Cookbook: Second Edition

Book details
Book preview
Table of contents
Citations

About This Book

In Node Cookbook Second Edition, each chapter focuses on a different aspect of working with Node. Following a Cookbook structure, the recipes are written in an easy-to-understand language. Readers will find it easier to grasp even the complex recipes which are backed by lots of illustrations, tips, and hints. If you have some knowledge of JavaScript and want to build fast, efficient, scalable client-server solutions, then Node Cookbook Second Edition is for you. Knowledge of Node will be an advantage but is not required. Experienced users of Node will be able to improve their skills.

Frequently asked questions

Simply head over to the account section in settings and click on ā€œCancel Subscriptionā€ - itā€™s as simple as that. After you cancel, your membership will stay active for the remainder of the time youā€™ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlegoā€™s features. The only differences are the price and subscription period: With the annual plan youā€™ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, weā€™ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Node Cookbook: Second Edition by David Mark Clements in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in JavaScript. We have over one million books available in our catalogue for you to explore.

Information

Year
2014
ISBN
9781783280445
Edition
1

Node Cookbook Second Edition


Table of Contents

Node Cookbook Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Making a Web Server
Introduction
Setting up a router
Getting ready
How to do it...
How it works...
There's more...
Simple multilevel routing
Parsing the querystring module
The routing modules
See also
Serving static files
Getting ready
How to do it...
How it works...
There's more...
The favicon gotcha
See also
Caching content in memory for immediate delivery
Getting ready
How to do it...
How it works...
There's more...
Reflecting content changes
See also
Optimizing performance with streaming
Getting ready
How to do it...
How it works...
There's more...
Protecting against process memory overruns
See also
Securing against filesystem hacking exploits
Getting ready
How to do it...
How it works...
There's more...
Whitelisting
Node static
See also
2. Exploring the HTTP Object
Introduction
Processing POST data
Getting ready
How to do it...
How it works...
There's more...
Accessing POST data with connect and body-parser
See also
Handling file uploads
Getting ready
How to do it...
How it works...
There's more...
Using formidable to accept all POST data
Preserving filenames with formidable
Uploading files via PUT
See also
Using Node as an HTTP client
Getting ready
How to do it...
How it works...
There's more...
Sending POST requests
Multipart file upload as a client
See also
Implementing download throttling
Getting ready
How to do it...
How it works...
There's more...
Enabling a resume request from broken downloads
See also
3. Working with Data Serialization
Introduction
Converting an object to JSON and back
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Constructing JSONP responses
Security and JSONP
See also
Converting an object to XML and back
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Generating XML attributes and text nodes
Partial application
See also
Browser-server transmission via AJAX
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Sending serialized data from the client to the server
See also
Working with real data ā€“ fetching trending tweets
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Cross referencing Google Hot Trends with Twitter tweets
See also
4. Interfacing with Databases
Introduction
Writing to a CSV file
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Customizing the CSV elements
Reading a CSV file
Manipulating the CSV data stream
See also
Connecting and sending SQL to a MySQL server
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Using and cleaning user input
Receiving results from the MySQL server
See also
Storing and retrieving data with MongoDB
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Indexing and aggregation
Updating modifiers, sort, and limit
MongoDB without MongoDB
See also
Storing data to CouchDB with Cradle
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Scaling CouchDB with BigCouch
See also
Retrieving data from CouchDB with Cradle
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Creating an admin user
Locking all modifying operations to an admin user
Exposing the CouchDB HTTP interface to remote connections
See also
Accessing the CouchDB changes stream with Cradle
Getting ready
How to do itā€¦
How it worksā€¦
See also
Storing and retrieving data with Redis
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Speeding up the Node Redis module
Overcoming network latency by pipelining commands
See also
Implementing PubSub with Redis
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Redis authentication
Securing Redis from external connections
See also
5. Employing Streams
Introduction
Consuming streams
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Using read's size argument
Consuming via the data event
See also
Playing with pipes
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Chaining and filtering streams
Preparing for greater complexity
See also
Making stream interfaces
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Making reusable streams
Transform streams
See also
Streaming across Node processes
Getting ready
How to do itā€¦
How it worksā€¦
There's moreā€¦
Processing stream chunk buffers efficiently
Streaming over TCP
See also
6. Going Real Time
Introduction
Creating a WebSocket server
Getting ready
How to do it...
How it works...
There's more...
Creating a Node-based WebSocket client
WebSocket streams
See also
Cross-browser real-time logic with Socket.IO
Getting ready
How to do it...
How it works...
There's more...
Custom events
See also
Remote Procedure Calls with Socket.IO
Getting ready
How to do it...
How it works...
There's more...
Remote Procedure Calls with SockJS
See also
Creating a real-time widget
Getting rea...

Table of contents

  1. Node Cookbook Second Edition