Get Programming with Node.js
Jonathan Wexler
  • MEAP began July 2017
  • Publication in Spring 2018 (estimated)
  • ISBN 9781617294747
  • 350 pages (estimated)
  • printed in black & white

Get Programming with Node.js teaches you to write server-side code in JavaScript using Node.js. In 34 fast-paced, fun, and practical lessons, you'll discover how to extend your existing JavaScript skills to write back-end code for your web applications. After setting up the perfect developer environment, you'll get straight into developing your first app using Express.js, a lightweight MVC-style web framework. You'll learn all-important security and authentication features, as well as database tasks. When your basic app is completed, you'll add extra functionality like chat before deploying the finished product. Thanks to the easy-to-digest examples and exercises, you'll be coding with Node.js like a pro in no time!

"...easy to read style and lots of short cuts I didn't know about that makes coding a lot quicker & convenient..."

~ Aindriu Mac Giolla Eoin

"Takes you from knowing nothing to serving web pages using Node.js."

~ Roger Sperberg

"If you are a web developer and want to get into Node.js, this book is a very good option for you."

~ Vinicius Miana Bezerra

Table of Contents detailed table of contents

Unit 0: Getting Set Up

Lesson 0: Set up Node.js and the JavaScript Engine

0.1 What you’re going to learn

0.2 Understanding Node.js

0.3 The minimally qualified reader

0.4 Why learn to develop in Node.js?

0.5 Preparing yourself for this book

0.6 Summary

0.7 Answers to Quick Check Exercises

Lesson 1: Setting up your environment

1.1 Installing Node.js

1.2 Installing a text editor

1.3 Working with the Node.js REPL in terminal

1.4 Summary

Lesson 2: Running a Node.js application

2.1 Creating a JavaScript file

2.2 Running your JavaScript file with Node.js

2.3 Running Individual JavaScript Commands

2.4 Summary

2.5 Answers to Quick Check Exercises

Unit 1: Getting Started with Node.js

Lesson 3: Setting up a Node.js application

3.1 Creating a Node.js module

3.2 Running npm commands

3.3 Initializing a Node.js application

3.4 Summary

3.5 Answers to Quick Check Exercises

Lesson 4: Building a simple web server in Node.js

4.1 Understanding web servers

4.2 Initialize the application with npm

4.3 Code the application

4.4 Run the application

4.5 Summary

4.6 Answers to Quick Check Exercises

Lesson 5: Handling incoming data

5.1 Reworking your server code

5.2 Analyzing request data

5.3 Adding Routes to a Web Application

5.4 Summary

5.5 Answers to Quick Check Exercises

Lesson 6: Writing better routes and serving external files

6.1 Serving static files with the fs module

6.2 Serving assets

6.3 Moving your routes to another file

6.4 Summary

6.5 Answers to Quick Check Exercises

Lesson 7: Capstone: A static web application

7.1 Initializing the application

7.2 Application directory structure

7.3 Creating main.js and router.js

7.4 Creating views

7.5 Adding Assets

7.6 Creating routes

7.7 Handle file reading errors

7.8 Summary

Unit 2: Easier Web Development with Express

Lesson 8: Setting up an app with Express.js

8.1 Installing the Express.js package

8.2 Building your first Express.js application

8.3 Working your way around a web framework

8.4 Summary

8.5 Answers to Quick Check Exercises

Lesson 9: Routing in Express.js

9.1 Building routes with Express.js

9.2 Analyzing Request data

9.3 Express.js and MVC

9.4 Summary

9.5 Answers to Quick Check Exercises

Lesson 10: Connecting Views with templates

10.1 Connecting a templating engine

10.2 Passing data from your controllers

10.3 Setting up partials and layouts

10.4 Summary

10.5 Answers to Quick Check Exercises

Lesson 11: Configurations and error handling

11.1 Modifying your start script

11.2 Handling errors with Express.js

11.3 Serving static files

11.4 Summary

11.5 Answers to Quick Check Exercises

Lesson 12: Capstone: Enhancing the Confetti Cuisine site with Express.js

12.1 Initializing the application

12.2 Building the application

12.3 Adding more routes

12.4 Routing to views

12.5 Serving static views

12.6 Passing content to the views

12.7 Handle the errors

12.8 Summary

Unit 3: Connecting to a database

Lesson 13: Set up a MongoDB database

13.1 Setting up MongoDB

13.2 Running commands in the MongoDB shell

13.3 Connecting MongoDB to your application

13.4 Summary

13.5 Answers to Quick Check Exercises

Lesson 14: Building Models with Mongoose

14.1 Setting up Mongoose with your Node.js application

14.2 Creating a schema

14.3 Organizing your models

14.4 Summary

14.5 Answers to Quick Check Exercises

Lesson 15: Connecting Controllers and Models

15.1 Creating a controller for subscribers

15.2 Saving posted data to a model

15.3 Using promises with Mongoose

15.4 Summary

15.5 Answers to Quick Check Exercises

Lesson 16: Capstone: Saving user subscriptions

16.1 Setting up the database

16.2 Modeling data

16.3 Adding a subscription form

16.4 Summary

Unit 4: Building a user model

Lesson 17: Improving your data models

17.1 Adding validations on the model

17.2 Testing models in REPL

17.3 Creating model associations

17.4 Populating data from associated models

17.5 Summary

17.6 Answers to Quick Check Exercises

Lesson 18: Building the user model

18.1 Building the user model

18.2 Adding CRUD methods to your models

18.3 Building the index page

18.4 Summary

18.5 Answers to Quick Check Exercises

Lesson 19: Creating and reading your models

19.1 Building the new user form

19.2 Creating new users from a view

19.3 Reading user data with show

19.4 Summary

19.5 Answers to Quick Check Exercises

Lesson 20: Updating and deleting your models

20.1 Building the edit user form

20.2 Updating users from a view

20.3 Deleting users with the delete action

20.4 Summary

20.5 Answers to Quick Check Exercises

Lesson 21: Capstone: Adding CRUD models to Confetti Cuisine

21.1 Getting set up

21.2 Building the models

21.3 Creating the views

21.4 Structuring routes

21.5 Creating controllers

21.6 Summary

Unit 5 Authenticating user accounts

Lesson 22 Adding sessions and flash messages

Lesson 23 Building a user login and encrypting passwords

Lesson 24 Adding user authentication

Lesson 25 Capstone: Adding user authentication

Unit 6 Adding Chat functionality

Lesson 26 Working with Socket.io

Lesson 27 Build a chat system

Lesson 28 Improve database efficiency

Lesson 29 Capstone: Add chat functionality to your app

Unit 7 Deploying your app

Lesson 30 Getting set up

Lesson 31 Deploy your application

Lesson 32 Debug your app in production

Lesson 33 Capstone Deploy your app

Appendixes

Appendix A: Appendix A

A.1 New in ES6

A.2 Let

A.3 Const

A.3.1 String Interpolation

A.3.2 Arrow Functions

A.4 JavaScript in Node.js

Appendix B: Appendix B

B.1 Logging

B.2 Global objects

B.2.1 Other non-global objects

About the Technology

Why use several languages for a web application when you only need one? Node.js is a server-side platform and runtime that you can use to build full stack web applications entirely in JavaScript! Node supports scalable, high-performance applications with easy asynchronous communication, an event-driven mindset, and a vast ecosystem of tools and modules. Node can handle the real-time response rates that games, chat sites, and statistical services need, and you get to program everything in JavaScript.

What's inside

  • Setting up your Node development environment
  • Creating a simple web server
  • Working with Express.js
  • Saving application data to a MongoDB database
  • Building a complete REST API
  • Deploying the finished product
  • Debugging your app in production order

About the reader

Written for developers who know HTML, CSS, and JavaScript. No prior experience with Node.js is required.

About the author

Jonathan Wexler has an extensive background in computer theory and web development. Having curated a Node.js curriculum as the academic director and lead developer for The New York Code and Design Academy, Jonathan has instructed multiple intensive programs in full stack development and currently works as a senior developer for Bloomberg LP.


Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
Buy
MEAP combo $44.99 pBook + eBook + liveBook
MEAP eBook $35.99 pdf + ePub + kindle + liveBook

FREE domestic shipping on three or more pBooks