Unit 1. Getting started with Node.js

Now that you’ve gone through unit 0 and have Node.js installed and running, it’s time to see it working. Unit 1 is about building from the get-go. You begin by building a small web application in Node.js and gradually piece together the components that work behind the scenes. In this unit, you learn all you need to get a web server running on Node.js that serves some simple static content: HTML pages, pictures, and a stylesheet. Toward this goal, you look at the following topics:

  • Lesson 3 introduces npm and discusses how to configure a new Node.js application. In this lesson, you build a Node.js module, and learn how packages and modules offer tools and support to your application.
  • Lesson 4 introduces the idea of a web server running on Node.js as a way to launch a simple website. You learn how to set up the server and write code to get your website content viewable.
  • Lesson 5 builds on lesson 2 by giving the app enough information to load web content based on different requests. In this lesson, you build your first application route—a system for connecting content to URLs in your application.
  • Lesson 6 teaches you how to serve different HTML files from your web server rather than simple responses. This lesson adds support for application assets: CSS, JavaScript that runs on the user’s device, and image loading. Together, these concepts enable you to organize and structure your application to handle more requests to your website with less code clutter.
  • Finally, lesson 7 shows you how to put everything together by building a complete multipage application. You start a new application from scratch; then you add three views, routes for the views and assets, and a public client folder.

When you’re solid on how to build a static site from scratch, unit 2 takes you to the next step: using a framework to build your application faster.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.66.156