Putting It All Together – Building a Promise App
We've learned techniques for using promises in web projects as well as Node.js APIs. Let's combine our earlier exercises to build a web application that renders progressively as data is ready and makes use of asynchronous programming on the server to avoid blocking the event loop.
Activity 12.01: Building a Promise App
In this activity, we're going to build a web application that talks to the API we just built. Although frameworks such as Angular, React, and Vue are very popular, those are covered in later chapters so we will build a very basic TypeScript application with no bells or whistles.
Note
This activity provides a UI application that communicates with the backend API we built in Exercise 12.06, Implementing a RESTful API backed by sqlite. In order to get the output shown, you will need to have your API running. Return to that exercise for help if you need it.
This UI application will connect...