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 modulesExpress, a web framework on a server
MongoDB and the terminal
The MongoDB connection with Mongoose
Mongoose schemas and models