Web Development with MongoDB and NodeJS - Second Edition

Build an interactive and full-featured web application from scratch using Node.js and MongoDB

Web Development with MongoDB and NodeJS - Second Edition

This ebook is included in a Mapt subscription
Mithun Satheesh, Bruno Joseph D'mello, Jason Krol

3 customer reviews
Build an interactive and full-featured web application from scratch using Node.js and MongoDB
$0.00
$22.40
$39.99
$29.99p/m after trial
RRP $31.99
RRP $39.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 4,000+ eBooks & Videos
  • 40+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781785287527
Paperback300 pages

Book Description

Node.js and MongoDB are quickly becoming one of the most popular tech stacks for the web. Powered by Google's V8 engine, Node.js caters to easily building fast, scalable network applications while MongoDB is the perfect fit as a scalable, high-performance, open source NoSQL database solution. Using these two technologies together, web applications can be built quickly and easily and deployed to the cloud with very little difficulty.

The book will begin by introducing you to the groundwork needed to set up the development environment. Here, you will quickly run through the steps necessary to get the main application server up and running. Then you will see how to use Node.js to connect to a MongoDB database and perform data manipulations.

From here on, the book will take you through integration with third-party tools for interaction with web apps. It then moves on to show you how to use controllers and view models to generate reusable code that will reduce development time. Toward the end of the book, we will cover tests to properly execute the code and some popular frameworks for developing web applications.

By the end of the book, you will have a running web application developed with MongoDB and Node.js along with it's popular frameworks.

Table of Contents

Chapter 1: Welcome to JavaScript in the Full Stack
A short introduction to Node.js
npm – the Node Package Manager
Sharing and reusing JavaScript
A simple server with Node.js
The NoSQL movement
A short introduction to MongoDB
Node and MongoDB in the wild
What to expect from this book
Summary
Chapter 2: Getting Up and Running
Installing Node.js
Installing MongoDB
Writing your first app
Adding the application code
Summary
Chapter 3: Node and MongoDB Basics
A JavaScript primer
The basics of Node.js
Installing modules using npm
The basics of MongoDB
Additional resources
Summary
Chapter 4: Introducing Express
Web application frameworks
What is Express.js?
Building a complete web application
Using and understanding middleware
The configure module
Routers and controllers
Custom middleware
Handlebars as view engines
Summary
Chapter 5: Templating with Handlebars
Templating engines
Server-side and client-side templating
Views
Layouts
Partial views
The basics of Handlebars
Handlebars helpers
Rendering the views
Summary
Chapter 6: Controllers and View Models
Controllers
View models
Updating the home controller
Updating the image controller
Helpers for reusable code
Iterating on the UI
Summary
Chapter 7: Persisting Data with MongoDB
Using MongoDB with Node.js
Introducing Mongoose
Defining the schemas and models
Adding CRUD to the controllers
Iterating by adding an image removal capability
Refactoring and improvements
Summary
Chapter 8: Creating a RESTful API
What is an API?
What is a RESTful API?
Introducing Postman REST Client
Creating a basic API server
Responding to GET requests
Receiving data – POST and PUT requests
Removing data – DELETE
Consuming external APIs from Node.js
Summary
Chapter 9: Testing Your Code
The tools of the trade
Writing and running your first test
Testing the application
Spy and stub everything!
Summary
Chapter 10: Deploying with Cloud-Based Services
Cloud versus traditional hosting
An introduction to Git
Deploying your application
Summary
Chapter 11: Single-Page Applications with Popular Frontend Frameworks
What is a Single-Page Application?
Why use a frontend framework?
Frontend development tools
Testing and test-driven development
Summary
Chapter 12: Popular Node.js Web Frameworks
Koa
Meteor
Sails
Hapi
Flatiron
Summary

What You Will Learn

  • Configure your development environment to use Node.js and MongoDB
  • Write and configure a web server using Node.js powered by the Express.js framework
  • Build dynamic HTML pages using the Handlebars template engine
  • Persist application data using MongoDB and Mongoose ODM
  • Test your code using automated testing tools such as the Mocha framework
  • Deploy the development environment to the cloud using services such as Heroku, Amazon Web Services, and Microsoft Azure
  • Explore Single-Page application frameworks to take your web applications to the next level

Authors

Table of Contents

Chapter 1: Welcome to JavaScript in the Full Stack
A short introduction to Node.js
npm – the Node Package Manager
Sharing and reusing JavaScript
A simple server with Node.js
The NoSQL movement
A short introduction to MongoDB
Node and MongoDB in the wild
What to expect from this book
Summary
Chapter 2: Getting Up and Running
Installing Node.js
Installing MongoDB
Writing your first app
Adding the application code
Summary
Chapter 3: Node and MongoDB Basics
A JavaScript primer
The basics of Node.js
Installing modules using npm
The basics of MongoDB
Additional resources
Summary
Chapter 4: Introducing Express
Web application frameworks
What is Express.js?
Building a complete web application
Using and understanding middleware
The configure module
Routers and controllers
Custom middleware
Handlebars as view engines
Summary
Chapter 5: Templating with Handlebars
Templating engines
Server-side and client-side templating
Views
Layouts
Partial views
The basics of Handlebars
Handlebars helpers
Rendering the views
Summary
Chapter 6: Controllers and View Models
Controllers
View models
Updating the home controller
Updating the image controller
Helpers for reusable code
Iterating on the UI
Summary
Chapter 7: Persisting Data with MongoDB
Using MongoDB with Node.js
Introducing Mongoose
Defining the schemas and models
Adding CRUD to the controllers
Iterating by adding an image removal capability
Refactoring and improvements
Summary
Chapter 8: Creating a RESTful API
What is an API?
What is a RESTful API?
Introducing Postman REST Client
Creating a basic API server
Responding to GET requests
Receiving data – POST and PUT requests
Removing data – DELETE
Consuming external APIs from Node.js
Summary
Chapter 9: Testing Your Code
The tools of the trade
Writing and running your first test
Testing the application
Spy and stub everything!
Summary
Chapter 10: Deploying with Cloud-Based Services
Cloud versus traditional hosting
An introduction to Git
Deploying your application
Summary
Chapter 11: Single-Page Applications with Popular Frontend Frameworks
What is a Single-Page Application?
Why use a frontend framework?
Frontend development tools
Testing and test-driven development
Summary
Chapter 12: Popular Node.js Web Frameworks
Koa
Meteor
Sails
Hapi
Flatiron
Summary

Book Details

ISBN 139781785287527
Paperback300 pages
Read More
From 3 reviews

Read More Reviews