Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Node.js Web Development

You're reading from   Node.js Web Development Server-side web development made easy with Node 14 using practical examples

Arrow left icon
Product type Paperback
Published in Jul 2020
Publisher Packt
ISBN-13 9781838987572
Length 760 pages
Edition 5th Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
David Herron David Herron
Author Profile Icon David Herron
David Herron
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Section 1: Introduction to Node.js
2. About Node.js FREE CHAPTER 3. Setting Up Node.js 4. Exploring Node.js Modules 5. HTTP Servers and Clients 6. Section 2: Developing the Express Application
7. Your First Express Application 8. Implementing the Mobile-First Paradigm 9. Data Storage and Retrieval 10. Authenticating Users with a Microservice 11. Dynamic Client/Server Interaction with Socket.IO 12. Section 3: Deployment
13. Deploying Node.js Applications to Linux Servers 14. Deploying Node.js Microservices with Docker 15. Deploying a Docker Swarm to AWS EC2 with Terraform 16. Unit Testing and Functional Testing 17. Security in Node.js Applications 18. Other Books You May Enjoy

Developing microservices or maxiservices with Node.js

New capabilities, such as cloud deployment systems and Docker, make it possible to implement a new kind of service architecture. Docker makes it possible to define server process configuration in a repeatable container that's easy to deploy by the millions into a cloud-hosting system. It lends itself best to small, single-purpose service instances that can be connected together to make a complete system. Docker isn't the only tool to help simplify cloud deployments; however, its features are well attuned to modern application deployment needs.

Some have popularized the microservice concept as a way to describe this kind of system. According to the microservices.io website, a microservice consists of a set of narrowly focused, independently deployable services. They contrast this with the monolithic application-deployment pattern where every aspect of the system is integrated into one bundle (such as a single WAR file for a Java EE app server). The microservice model gives developers much-needed flexibility.

Some advantages of microservices are as follows:

  • Each microservice can be managed by a small team.
  • Each team can work on its own schedule, so long as the service API compatibility is maintained.
  • Microservices can be deployed independently should this be required, such as for easier testing.
  • It's easier to switch technology stack choices.

Where does Node.js fit in with this? Its design fits the microservice model like a glove:

  • Node.js encourages small, tightly focused, single-purpose modules.
  • These modules are composed into an application by the excellent npm package management system.
  • Publishing modules is incredibly simple, whether via the NPM repository or a Git URL.
  • While an app framework such as Express can be used with large services, it works very well for small lightweight services and supports easy, simple deployment.

In short, it's easy to use Node.js in a lean and agile fashion, building large or small services depending on your architecture preferences.

You have been reading a chapter from
Node.js Web Development - Fifth Edition
Published in: Jul 2020
Publisher: Packt
ISBN-13: 9781838987572
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image