Book Image

Learn Node.js by Building 6 Projects

By : Eduonix Learning Solutions
Book Image

Learn Node.js by Building 6 Projects

By: Eduonix Learning Solutions

Overview of this book

<p>With its event-driven architecture and efficient web services capabilities, more and more companies are building their entire infrastructure around Node.js. Node has become a de facto part of web development that any serious developer needs to master.</p> <p>This book includes six Node.js projects that gradually increase in complexity. You'll start by building a simple web server and create a basic website. You will then move to create the login system, blog system, chat system, and e-learning system.</p> <p>By creating and following the example projects in this book, you’ll improve your Node.js skills through practical working projects, and you'll learn how to use Node.js with many other useful technologies, such as ExpressJS, Kickstart, and Heroku.</p>
Table of Contents (12 chapters)

Understanding Express


Express is a full web framework and also a web server. We'll build a very, very simple site for computer repair and we'll focus on routing, parsing data using the Pug template engine, and also using a module called Nodemailer, which gives us a contact form:

So this is the Home page, and then we have an About page and also a Contact form that works using Nodemailer:

It is a very simple application but it's a nice introductory to Express, which we'll be using throughout the book. So lets get started!

Installing Express

In this project we're going to be building a website using the Express framework. Express is a Node.js module that gives us a full framework, it gives us a routing system and an HTTP server.

To install it, it's really simple we just need to say npm install express although we're going to add the -g flag because we want to install it globally so that we can access it from anywhere. From the frontend this website is going to be very, very simple, it'll just have...