Book Image

Web Development with MongoDB and Node - Third Edition

Book Image

Web Development with MongoDB and Node - Third Edition

Overview of this book

Node.js builds fast, scalable network applications while MongoDB is the perfect fit as a high-performance, open source NoSQL database solution. The combination of these two technologies offers high performance and scalability and helps in building fast, scalable network applications. Together they provide the power for manage any form of data as well as speed of delivery. This book will help you to get these two technologies working together to build web applications quickly and easily, with effortless deployment to the cloud. You will also learn about angular 4, which consumes pure JSON APOIs from a hapi server. The book begins by setting up your development environment, running you 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 to interact with web apps. You will see how to use controllers and view models to generate reusable code that will reduce development time. Toward the end, the book supplies tests to properly execute your code and take your skills to the next level with the most popular frameworks for developing web applications. By the end of the book, you will have a running web application developed with MongoDB, Node.js, and some of the most powerful and popular frameworks.
Table of Contents (19 chapters)
Title Page
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

What to expect from this book


The remainder of this book is going to be a guided tour that walks you through the creation of a complete data-driven website. The website we create will feature almost every aspect of a typical large-scale web development project. The app will be developed using a popular Node.js framework called Express, and it will persist data using MongoDB. In the first few chapters, we will cover the groundwork involved in getting the core of the server up and serving content. This includes configuring your environment so you are up and running with Node.js and MongoDB, and a basic introduction to the core concepts of both technologies. Then, we will write a web server powered by ExpressJS from scratch, which will handle serving all of the necessary files for the website. From there, we will work with the Handlebars template engine to serve both static and dynamic HTML web pages. Diving deeper, we will make the application persistent by adding a data layer where the records for the website will be saved and retrieved via a MongoDB server.

We will cover writing a RESTful API so that other people can interact with your application. Finally, we will go into the details to see how to write and execute tests for all of your code. A summary is given in the following section.

Wrapping up, we will take a brief detour as we examine some popular, merging frontend technologies that are becoming increasingly popular while writing SPAs. These technologies include Backbone.js, Angular, and Ember.js.

Last but not least, we will go into detail about how to deploy your new website to the Internet using popular cloud-based hosting services such as Heroku and Amazon Web Services.