liveBook · Manning

Static serving

As explained in Build a Frontend Web Framework (From Scratch)

The delivery of files directly from storage without generating or modifying their contents for each request.

Static serving delivers already generated files directly from storage. The server reads each file from disk and sends it without generating or modifying content for the request. section 1.3.1

A simplified frontend deployment proceeds through these responsibilities:

  • Generate or copy index.html from the static-assets directory. section 1.3.1
  • Copy static assets such as images, fonts, and audio clips to the output directory. section 1.3.1
  • Optionally preprocess assets or transform JavaScript before bundling. section 1.3.1
  • Upload the resulting files to a server for delivery. section 1.3.1

Typical output

A build may produce app.bundle.js, vendors.bundle.js, bundle.css, and index.html. When requested, the server statically serves these files to the browser. section 1.3.1

Figure 1.4 A simplified diagram of a frontend application’s build process
figure

Use the simplified build-process diagram to connect source assets and transformations with the files ultimately served. section 1.3.1

How Build a Frontend Web Framework (From Scratch) covers it

How deep it goes
Defines direct file delivery and contrasts server-side rendering, while simplifying rather than detailing production build complexity.
Examples
Uses index.html, app.bundle.js, vendors.bundle.js, bundle.css, images, fonts, and audio clips as served artifacts.
What you can do after
Operate a deployment by recognizing which built frontend files a server can send directly to browsers.
How it connects
Contrasts with server-side rendering and connects to build processes, static assets, and single-page applications.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build a Frontend Web Framework (From Scratch). The section links point to the parts of the book it draws on.