Book Image

AJAX Next Level (Authentication, Servers, Modules, Projects, and More) [Video]

By : SkillZone .
Book Image

AJAX Next Level (Authentication, Servers, Modules, Projects, and More) [Video]

By: SkillZone .

Overview of this book

AJAX allows your users to add/delete/view/update content, post comments, submit reviews, submit forms, and a ton more, without getting a page refresh. This course will captivate you with real-life examples and catapult you to the next level and set you well on your way to achieving everything you want to with AJAX. This course introduces you to AJAX and lays the foundation. Later on, you will start digging into advanced concepts such as Basic Auth, CORS, and servers. In this course, you will learn how to send authentication information using the XHR object and the Fetch API. You will see how to take user inputs, convert them into JSON data, and send that data to a server. Understand how to retrieve XML, JSON, and text data from a server. Look at how to take data from the server and update the page dynamically using JavaScript. You will also learn how to write great code using modules, write middleware and define RESTful AJAX APIs, and more. Finally, you will build a fully functional site that performs basic CRUD operations and saves data to a server. This simple application will use the power of RESTful AJAX APIs to speak to a server and perform tasks like adding/deleting/updating and viewing data that is stored on your server. By the end of this course, you will be able to “speak” and “walk” AJAX by gaining an understanding of how you can use it in meaningful and practical ways. All the resource files are added to the GitHub repository at: https://github.com/PacktPublishing/AJAX-Next-Level-Authentication-Servers-Modules-Projects-and-More-
Table of Contents (11 chapters)
11
Conclusion
Chapter 6
Course Final Project – Task 1 – Server and Routes
Content Locked
Section 1
Introduction to Section
Before we start writing our AJAX APIs, I want to start with defining the API endpoints in a server file. This may be a difficult section because we will be using Node.js to create our server and define routes. However, the author wants you to become a grandmaster at coding and therefore, you need to understand (even at a high level) what happens when an AJAX request hits a server.