Book Image

Learning Single-page Web Application Development

Book Image

Learning Single-page Web Application Development

Overview of this book

Table of Contents (15 chapters)
Learning Single-page Web Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 2. Taking a Deep Dive into Node.js and MongoDB

A built-in asynchronous I/O, single-threaded or even multithreaded, real-time applications, sockets, and HTTP connections make Node.js the most powerful tool to create web servers that run JavaScript on the server side.

MongoDB is agile, scalable, document-oriented schema less, and high performance, which makes it one of the most popular NoSQL databases. Node.js and MongoDB unleashed all the power for high-performance web applications with Express, a lightweight web framework that supports template engines, routing, and flash notices. It's very similar to Sinatra from Ruby. Moving forward, we will see some of the key concepts about all of these tools.

The following will be covered in the chapter:

  • Node server, NPM, and middlewares

  • Event-driven development and the event loop

  • Working with require() and modules

  • Express, a web framework on a server

  • MongoDB and the terminal

  • The MongoDB connection with Mongoose

  • Mongoose schemas and models