CS I · Mon Nov 16 · 16.1 · Do Now

Hosting

Open the discussion form on the right and answer Section 1 from your first reading.

Announcements

Hosts, Deploys and Static Sites

This section explains where a website's files are kept, how they get there, and what the computer that keeps them does all day.

What a Host Does

A website is made of files, such as HTML pages, style files, pictures and JavaScript files. A computer that other people's browsers can reach has to store those files. A host is a server that is always on and connected to the internet, and it stores a site's files and sends them to any browser that asks for them. Mozilla's guide for web developers describes this kind of server as a computer that stores a website's files and connects to the internet. The same guide notes that, apart from downtime and system trouble, a dedicated web server stays connected to the internet all the time. For example, when a student opens Bench Basics at 9 in the morning and again at 9 at night, the browser asks the host for the same files both times, and the host sends them.

A computer that is switched off cannot be a host, and neither can a computer that cannot be reached from the internet, because no browser could get the files from it. A repository is also different from a host. As the Nov 11 lesson explained, a repository keeps a project's files together with their full history. Keeping files is a different job from serving them, and a repository does not send its files to browsers as a website. Mozilla's guide calls rented file space on a hosting company's server web hosting.

How a Deploy Works

To deploy a project means to copy its current files to the host. A deploy does not empty the repository. After a deploy, the files are in two places: the repository, which keeps the files and their history, and the host, which serves them. A site can be reached from anywhere only once a deploy has copied its files to a host that is on the internet.

The class site shows how this works, because its files are kept in a repository whose history begins with a commit on April 21, 2026, and the commit deployed on Oct 19 was number 941 in that history. When a change is ready, a person makes a commit and sends it to the repository's copy on GitHub, and that starts a deploy. The deploy builds the site and copies it to its host. The class site's host is Cloudflare, and the site's address is muggsofcompsci.net. On Oct 19, one real deploy of the class site took 2 minutes and 16 seconds from start to finish, so the change reached the host in about 2 minutes.

A commit that has not been deployed is in the history, but it is not on the live site. Until the next deploy, the host keeps sending browsers the older files. For this reason, a fix that is committed but never deployed exists only in the repository.

Static Sites and Code That Runs

A static site is a site whose files are sent to the browser exactly as they are stored. Mozilla's guide calls a server of this kind static because it sends its hosted files to the browser as they are. For example, a one-page site of class rules, made of an HTML file, a CSS file and a picture, is a static site. The host does no work on those files beyond sending them. Figure 1 shows this path from left to right: first a deploy copies the files from the repository to the host, next a browser asks for a file, and then the host sends the file as stored.

The class site is only partly static. Its pictures and style files are stored on Cloudflare as static assets, and Cloudflare's documentation explains that a request for a stored file is answered with that file, without running the site's code. Other addresses on the class site run code each time they are asked. The class endpoint, which Code Coach uses on Thursday, is one of them. Each time a request arrives at the class endpoint, code on the host runs and sends back a new answer instead of a stored file. The class endpoint is therefore not part of a static site, and its work is a separate job from serving files. Figure 1 draws the class endpoint below the host and apart from the row of files for this reason.

Summary

A host is a server that is always on and connected to the internet, and it stores a site's files and sends them to browsers. A deploy copies a project's current files from the repository to the host, so the files end up in both places. A static site's files are sent as stored, while the class endpoint runs code for each request.

Sources: Mozilla, What is a web server? (n.d.); Mozilla, Publishing your website (n.d.); Cloudflare, Static Assets (n.d.); CS I, Repositories, Diffs and Change Logs (2026); class site repository and deploy record (2026).

I Do questions
  1. notebook cue: host

    Name two things that make a computer a host.

    Check

    A host is always on, and it is connected to the internet, so browsers can reach it. It also stores the site's files and sends them to any browser that asks. See What a Host Does, paragraphs 1 and 2, where a switched-off computer is the contrast case.

  2. notebook cue: deploy

    After a deploy, where are the class site's files? Name both places.

    Check

    They are in the repository, which keeps the files and their history, and on the host, Cloudflare, which serves them at muggsofcompsci.net. A deploy copies the files, so the repository still has them. See How a Deploy Works, paragraphs 1 and 2.

  3. notebook cue: static site

    A browser asks the host for a picture on the class site. Does the host change the picture first, or send it as stored?

    Check

    The host sends it as stored. Pictures and style files are static assets, so Cloudflare answers the request with the stored file without running the site's code. See Static Sites and Code That Runs, paragraph 2, where the class endpoint is the contrast case because it runs code for each request.

Figure 1. A deploy copies the files from the repository to a host that is always on and on the internet, the host sends each stored file to a browser that asks for it, and the class endpoint below the host runs code for each request.
I Do questions
  1. notebook cue: host

    Name two things that make a computer a host.

    Check

    A host is always on, and it is connected to the internet, so browsers can reach it. It also stores the site's files and sends them to any browser that asks. See What a Host Does, paragraphs 1 and 2, where a switched-off computer is the contrast case.

  2. notebook cue: deploy

    After a deploy, where are the class site's files? Name both places.

    Check

    They are in the repository, which keeps the files and their history, and on the host, Cloudflare, which serves them at muggsofcompsci.net. A deploy copies the files, so the repository still has them. See How a Deploy Works, paragraphs 1 and 2.

  3. notebook cue: static site

    A browser asks the host for a picture on the class site. Does the host change the picture first, or send it as stored?

    Check

    The host sends it as stored. Pictures and style files are static assets, so Cloudflare answers the request with the stored file without running the site's code. See Static Sites and Code That Runs, paragraph 2, where the class endpoint is the contrast case because it runs code for each request.

Hosts, Deploys and Static Sites

This section explains where a website's files are kept, how they get there, and what the computer that keeps them does all day.

What a Host Does

A website is made of files, such as HTML pages, style files, pictures and JavaScript files. A computer that other people's browsers can reach has to store those files. A host is a server that is always on and connected to the internet, and it stores a site's files and sends them to any browser that asks for them. Mozilla's guide for web developers describes this kind of server as a computer that stores a website's files and connects to the internet. The same guide notes that, apart from downtime and system trouble, a dedicated web server stays connected to the internet all the time. For example, when a student opens Bench Basics at 9 in the morning and again at 9 at night, the browser asks the host for the same files both times, and the host sends them.

A computer that is switched off cannot be a host, and neither can a computer that cannot be reached from the internet, because no browser could get the files from it. A repository is also different from a host. As the Nov 11 lesson explained, a repository keeps a project's files together with their full history. Keeping files is a different job from serving them, and a repository does not send its files to browsers as a website. Mozilla's guide calls rented file space on a hosting company's server web hosting.

How a Deploy Works

To deploy a project means to copy its current files to the host. A deploy does not empty the repository. After a deploy, the files are in two places: the repository, which keeps the files and their history, and the host, which serves them. A site can be reached from anywhere only once a deploy has copied its files to a host that is on the internet.

The class site shows how this works, because its files are kept in a repository whose history begins with a commit on April 21, 2026, and the commit deployed on Oct 19 was number 941 in that history. When a change is ready, a person makes a commit and sends it to the repository's copy on GitHub, and that starts a deploy. The deploy builds the site and copies it to its host. The class site's host is Cloudflare, and the site's address is muggsofcompsci.net. On Oct 19, one real deploy of the class site took 2 minutes and 16 seconds from start to finish, so the change reached the host in about 2 minutes.

A commit that has not been deployed is in the history, but it is not on the live site. Until the next deploy, the host keeps sending browsers the older files. For this reason, a fix that is committed but never deployed exists only in the repository.

Static Sites and Code That Runs

A static site is a site whose files are sent to the browser exactly as they are stored. Mozilla's guide calls a server of this kind static because it sends its hosted files to the browser as they are. For example, a one-page site of class rules, made of an HTML file, a CSS file and a picture, is a static site. The host does no work on those files beyond sending them. Figure 1 shows this path from left to right: first a deploy copies the files from the repository to the host, next a browser asks for a file, and then the host sends the file as stored.

The class site is only partly static. Its pictures and style files are stored on Cloudflare as static assets, and Cloudflare's documentation explains that a request for a stored file is answered with that file, without running the site's code. Other addresses on the class site run code each time they are asked. The class endpoint, which Code Coach uses on Thursday, is one of them. Each time a request arrives at the class endpoint, code on the host runs and sends back a new answer instead of a stored file. The class endpoint is therefore not part of a static site, and its work is a separate job from serving files. Figure 1 draws the class endpoint below the host and apart from the row of files for this reason.

Summary

A host is a server that is always on and connected to the internet, and it stores a site's files and sends them to browsers. A deploy copies a project's current files from the repository to the host, so the files end up in both places. A static site's files are sent as stored, while the class endpoint runs code for each request.

Sources: Mozilla, What is a web server? (n.d.); Mozilla, Publishing your website (n.d.); Cloudflare, Static Assets (n.d.); CS I, Repositories, Diffs and Change Logs (2026); class site repository and deploy record (2026).

Table Talk
Bench Basics opens at 9 in the morning and at 9 at night. Where are its files kept while nobody is looking at them? Name the place in a few words, and name one thing that place has to do all day.

Each table agrees on where the files are kept and on one job that place does all day.

Chromebooks stay closed while your table talks. Sections 1 and 2 of the discussion form are already done. After you talk, finish Section 3 right here under My View. Submit before the exit ticket.

This form has three sections. Section 1: answer today's Board Question. Section 2: after the reading. Section 3 opens later in class. Today's Board Question: Bench Basics opens at 9 in the morning and at 9 at night. Where are its files kept while nobody is looking at them? Name the place in a few words, and name one thing that place has to do all day.

CR 1. Board Question: Bench Basics opens at 9 in the morning and at 9 at night. Where are its files kept while nobody is looking at them? Name the place in a few words, and name one thing that place has to do all day. Give your answer and one reason.

Write your answer in your lab notebook, labeled CR 1.

MC 1. Think about your answer to the board question. Bench Basics opens at 9 in the morning and at 9 at night. Where are its files kept while nobody is looking at them? Name the place in a few words, and name one thing that place has to do all day. Which position is closest to yours now?

  • On the Chromebook. The browser keeps a copy after the first visit.
  • On a host, a server that stays on and sends the files to any browser that asks.
  • Nowhere. The site is made fresh by the internet each time.

MC 2. (Reading claim 1) Any computer can be a host.

  • Agree
  • Disagree

MC 3. (Reading claim 2) Deploying moves the files out of the repository, so the repository is empty afterward.

  • Agree
  • Disagree

MC 4. (Reading claim 3) A static site's files are sent to the browser as they are stored.

  • Agree
  • Disagree

MC 5. (Reading claim 4) In Figure 1, the class endpoint is drawn apart from the row because it runs code for each request instead of sending a stored file.

  • Agree
  • Disagree

MC 6. (Reading claim 5) A commit that has not been deployed already shows up on the live class site.

  • Agree
  • Disagree

MC 7. (Reading claim 6) One real deploy of the class site took about 2 minutes from start to finish.

  • Agree
  • Disagree

MC 8. (Reading claim 7) When a browser asks for a picture on the class site, the host changes the picture before sending it.

  • Agree
  • Disagree

MC 9. (Reading claim 8) Every part of the class site, including the class endpoint, is a static site.

  • Agree
  • Disagree

CR 2. (A different view) Write the view at your table that was most different from yours. If everyone agreed, write the strongest argument against your table's answer.

Write your answer in your lab notebook, labeled CR 2.

CR 3. Think about the Board Question again: Bench Basics opens at 9 in the morning and at 9 at night. Where are its files kept while nobody is looking at them? Name the place in a few words, and name one thing that place has to do all day. Do you have the same opinion as when you first answered the board question? If it is the same, what from the reading or table talk reaffirmed your opinion? If it is different, what from the reading or table talk changed your opinion?

Write your answer in your lab notebook, labeled CR 3.