Book description
Expert techniques for building fast servers and scalable, real-time network applications with minimal effort; rewritten for Node.js 8 and Node.js 9
About This Book
- Packed with practical examples and explanations, Mastering Node.js contains everything you need to take your applications to the next level.
- Unleash the full potential of Node.js 9 to build real-time and scalable applications.
- Gain in-depth knowledge of asynchronous programming, event loops, and parallel data processing.
- Explore Node's innovative event-non-blocking design, and build professional applications with the help of detailed examples.
Who This Book Is For
This book is targeted at JavaScript developers who want to take an in-depth look at the latest Node.js framework to create faster, scalable, real-time backend applications. Basic JavaScript programming knowledge—and also some previous Node.js development experience—are mandatory to get the best out of this book
What You Will Learn
- Build an Electron desktop app using Node that manages a filesystem
- Explore Streams and understand how they apply to building networked services
- Develop and deploy an SMS-driven customer service application
- Use WebSockets for rapid bi-directional communication
- Construct serverless applications with Amazon Lambda
- Test and debug with headless browsers, CPU profiling, Mocha, Sinon, and more
- Scale applications vertically and horizontally across multiple cores and web services
In Detail
Node.js, a modern development environment that enables developers to write server- and client-side code with JavaScript, thus becoming a popular choice among developers.
This book covers the features of Node that are especially helpful to developers creating highly concurrent real-time applications. It takes you on a tour of Node's innovative event non-blocking design, showing you how to build professional applications. This edition has been updated to cover the latest features of Node 9 and ES6. All code examples and demo applications have been completely rewritten using the latest techniques, introducing Promises, functional programming, async/await, and other cutting-edge patterns for writing JavaScript code. Learn how to use microservices to simplify the design and composition of distributed systems. From building serverless cloud functions to native C++ plugins, from chatbots to massively scalable SMS-driven applications, you'll be prepared for building the next generation of distributed software.
By the end of this book, you'll be building better Node applications more quickly, with less code and more power, and know how to run them at scale in production environments.
Style and approach
Mastering Node.js contains all of the examples and explanations you'll need to build applications in a short amount of time and at a low cost, running rapidly and at scale.
Table of contents
- Preface
- Understanding the Node Environment
- Understanding Asynchronous Event-Driven Programming
- Streaming Data Across Nodes and Clients
-
Using Node to Access the Filesystem
-
Directories, and iterating over files and folders
- Types of files
- File paths
- File attributes
- Opening and closing files
-
File operations
- fs.rename(oldName, newName, callback)
- fs.truncate(path, len, callback)
- fs.ftruncate(fd, len, callback)
- fs.chown(path, uid, gid, callback)
- fs.fchown(fd, uid, gid, callback)
- fs.lchown(path, uid, gid, callback)
- fs.chmod(path, mode, callback)
- fs.fchmod(fd, mode, callback) ----
- fs.lchmod(path, mode, callback)
- fs.link(srcPath, dstPath, callback)
- fs.symlink(srcPath, dstPath, [type], callback)
- fs.readlink(path, callback)
- fs.realpath(path, [cache], callback)
- fs.unlink(path, callback)
- fs.rmdir(path, callback)
- fs.mkdir(path, [mode], callback)
- fs.exists(path, callback)
- fs.fsync(fd, callback)
- Synchronicity
- Moving through directories
- Reading from a file
- Writing to a file
- Serving static files
- Handling file uploads
- A simple file browser
- Summary
-
Directories, and iterating over files and folders
- Managing Many Simultaneous Client Connections
- Creating Real-Time Applications
- Using Multiple Processes
- Scaling Your Application
- Microservices
- Testing Your Application
- Organizing Your Work into Modules
- Creating Your Own C++ Add-ons
Product information
- Title: Mastering Node.js - Second Edition
- Author(s):
- Release date: December 2017
- Publisher(s): Packt Publishing
- ISBN: 9781785888960
You might also like
book
Node.js Web Development - Fourth Edition
Create real-time applications using Node.js 10, Docker, MySQL, MongoDB, and Socket.IO with this practical guide and …
book
Node.js in Action, Second Edition
Node.js in Action, Second Edition is a thoroughly revised book based on the best-selling first edition. …
book
Node.js Web Development
Build scalable web applications using Node.js, Express.js, and the latest ECMAScript techniques, along with deploying applications …
book
Get Programming with Node.js
Get Programming with Node.js Get Programming with Node.js teaches you to write server-side code in JavaScript …