17 Creating a stand-alone web app, part 2

 

This chapter covers

  • Creating and consuming a web service
  • Completing the basic application features
  • Creating a deployment server and persistent data storage
  • Deploying the application in a container

In this chapter, I complete the stand-alone web application and prepare it for deployment, demonstrating the way that a TypeScript project dovetails with standard development processes for deployment. For quick reference, table 17.1 lists the TypeScript compiler options used in this chapter.

Table 17.1 The TypeScript compiler options used in this chapter (view table figure)

Name

Description

jsx

This option specifies how HTML elements in TSX files are processed.

jsxFactory

This option specifies the name of the factory function that is used to replace HTML elements in TSX files.

moduleResolution

This option specifies the style of module resolution that should be used to resolve dependencies.

outDir

This option specifies the directory in which the JavaScript files will be placed.

rootDir

This option specifies the root directory that the compiler will use to locate TypeScript files.

target

This option specifies the version of the JavaScript language that the compiler will target in its output.

17.1 Preparing for this chapter

17.2 Adding a web service

17.2.1 Incorporating the data source into the application

17.3 Completing the application

17.3.1 Adding a header class

17.3..2 Adding an order details class

17.3.3 Adding a confirmation class

17.3.4 Completing the application

17.4 Deploying the application

17.4.1 Adding the production HTTP server package

17.4.2 Creating the persistent data file

17.4.3 Creating the server

17.4.4 Using relative URLs for data requests

17.4.5 Building the application

17.4.6 Testing the production build

17.5 Containerizing the application

17.5.1 Installing Docker

17.5.2 Preparing the application

17.5.3 Creating the Docker container